Posts

Showing posts from July, 2011

xml - Android Multiple Screen Support not working -

I created my application only in one layout but now I need to support high resolution screens. I have JSON to get images from ListView . Images have shown good size on the 4-inch device, but the tablet images are on: Cropped up and down, so I added This code, which appears then from list_v.xml to droble-xhdi and droble-xxhd copy was done. And then i android: layout_width = "fill_parent" android: layout_height = "174dp" to Android : Layout_width = "fill_parent" Android: layout_height = "350dp" But still the XML file is running in my application layout folder. How do I set it to run XML file in the draweble-xxhdpi folder? You can set your XML layout file to drawable Folders !! Instead of just put it in: Layout - Small layout - Big layout - xlarge ...

c++ - How to return a dynamic object from operator function? -

I am writing an operator function - where my class object is a dynamic array of integers, operator takes Lieutenant and RAS object and Moves the object which is the set of elements in the LAS, but not the rhs. Although I have written a function but I am unable to return the set because right after the district object is called. IntegerSet & amp; IntegerSet :: operator - (IntegerSet & amp; rhs) const {IntegerSet Temp); // Local object elements are designed to store the same size as lhs int k = 0; Int lhssize = element (); // no set in the elements of rhssize = rhs.ElementSize (); For (int i = 0; i & lt; lhssize; i ++) {for (int j = 0; j & lt; rhssize; j ++) {if (rhs.ptr [j]! = Ptr [i ]) {k ++; }} If (k == rhssize) {temp = temp + ptr [i]; } K = 0; } Return temporary; } And here is the creator if you can not understand the object IntegerSet :: IntegerSet (const int and size) // works correctly {Capacity = size; Ptr = new int [capability] (); } IntegerSet ::

regex - Remove everything after last folder htaccess -

मेरे पास निम्न htaccess कोड है: पुनर्लेखनकोंड% {REQUEST_FILENAME}! -f पुनर्लेखक % {REQUEST_FILENAME}! -d रिवेराइटियम ^ ([^ /।] +) / ([^ / \।] +) Index.php? कार्य = स्थान और राज्य = $ 1 और शहर = $ 2 [एल] यह यूआरएल की तरह है: website.com/texas/houston website.com/new-york/new-york ... अगर मैं यूआरएल के वेबसाइट www.texas/houston/bfdsjfds पर जाता हूं, तो मुझे यूआरएल के लिए वेबसाइट www.doxas/houston जैसे सामग्री मिलती है। ऊपर दिए गए उदाहरण में मैं "/ bfdsjfds" कैसे निकाल सकता हूं? या उस पृष्ठ को 404 पर रीडायरेक्ट करें। आप एंड एंकर $ केवल / state / city : रीवाइट कंडोम% {REQUEST_FILENAME} से मेल खाएगा! -f पुनर्लेखन कन्वर्ट% {REQUEST_FILENAME}! -d रीव्रेट नियम ^ ([^ /।] + ) / ([^ /।] +) /? $ index.php? कार्य = स्थान और राज्य = $ 1 और शहर = $ 2 [एल] यह स्वचालित रूप से < कोड> वेबसाइट / टेक्सास / उज्ज्वल / बीएफडीजफ़ोड यूआरएल के प्रकार।

apache - How to output single character text with php? -

I am implementing an API for some service that has only one content in '0' or '1' Letter should be back in the letters header ('content-type: text / plain'); echo "1"; and header ('content-type: text / plain'); Print "1"; I also tried to leave the header line, but I always get a new line character at the end of the output. This is the output of PHP-V.PAP 5.3.28 (CLI) (Created: 15 December 2013 17:43:05) Copyright (C) 1997-2013 PHP Group Zend Engine v2.3.0, Copyright (C) 1998-2013 Zend Technologies httpd -v Server version has Outlook: Apache / 2.2.23 (UNIX) Server created: November 25, 2012 15:00:50 This code will only help in one file :) & lt ;? Php echo 1;

javascript - Align target to middle when using -

मैं कब उपयोग कर रहा हूं & lt; a href = "# id" & gt; । । । & LT; डीएल & gt; & LT; डीटी & gt; & lt; / डीटी & gt; & LT; dd & gt; & lt; / dd & gt; & lt; dd id = "id" & gt; & lt; / dd & gt; & LT; dd & gt; & lt; / dd & gt; & LT; डीएल & gt; पृष्ठ को स्क्रॉल करने के लिए आईडी को लक्षित करने के तरीके के रूप में पृष्ठ के शीर्ष में लक्ष्य आईडी दिखाता है क्या यह संभव है कि लक्ष्य पृष्ठ के मध्य में दिखाया जाएगा? पी.एस. यदि संभव हो तो सीएसएस का इस्तेमाल करके मैं इसे हासिल करना चाहूंगा। <>> $ ('। clickme') के रूप में इस प्रकार प्राप्त किया जा सकता है jQuery "(function () {var docHeight = $ (window)। हल्का () / 2; अलर्ट (डॉकहाइट) $ ('html, body')। ({scrollTop: ($ ('# target')। ऑफसेट () .top - docHeight) +11 / 11 # लक्ष्य / 2 की ऊंचाई या सटीकता के लिए पहली पंक्ति / 2 की ऊंचाई}, 1000);}); उम्मीद है कि यह मदद करता है

java - Custom map-reduce input formatter for Cassandra using native protocol -

I am using Apache Cassandra (1.2) and Apache Maps- to reduce some data, minimize I currently I use org.apache.cassandra.hadoop.cql3 to CqlPagingInputFormat . This provider uses Thief to draw data It seems that the thrift is quite slow (300M records, 3 node clusters take 8 hours to read), and since the original binary protocol is present, then I wonder Has anyone used it? Any other optimization and configuration is interested in tweaks - this is a different issue. My questions are What is the implementation of a map - reduce the input format which directly use the Cassandra Basic Protocol? If not, to use the datestacks driver, what will be the first steps to writing your own? Organization> apache.cassandra.hadoop.cql3.CqlInputFormat org.apache.cassandra.hadoop.cql3.CqlRecordReader org.apache.cassandra.hadoop.cql3.CqlConfigHelper Example of / Word code code in hasoop_cql3_word_count These classes are updated to use. It has been started

java - Split function issue? -

रिलेप्लेयर यूजर 1 कोड कंसोल पर उपरोक्त इनपुट के साथ ठीक काम करता है यह मेरे लिए खिलाड़ी 'user1' सफलतापूर्वक निकालता है हालांकि, यदि प्रयोक्ता कोई उपयोगकर्ता नाम का उल्लेख नहीं करता है, तो यह ऐरे-सूची में उपस्थित सभी खिलाड़ियों को हटा देने का संकेत देता है। रिलेप्लेयर (प्रविष्ट द्वारा दर्ज किया गया), कोड के नीचे विफल रहता है क्योंकि str [1] यहाँ पर कुछ भी नहीं है लेकिन मैं चाहता हूं कि स्ट्र [1] जैसे कि यह मान रिक्त है, यह मुझे सभी खिलाड़ियों को निकालने में मदद करता है। param = "0"; System.out.print ( "& gt;"); // type_op = in.next (); स्ट्रिंग str = in.nextLine (); स्ट्रिंग [] str1 = str.split (""); Type_op = str1 [0]; Param = str1 [1]; स्ट्रिंग [] param_split = param.split (","); if (type_op.equals ("removeplayer") & amp; amp; amp; param.Sequals (नल)) removeAllPlayers (); else if (type_op.equals ("removeplayer")) removeplayer (); मैंने अगले () के साथ ही प्रयोग करने की कोशिश की है, लेकिन उस स्

Matlab gamma correction when opening and writing files -

I am using matlab to do some calculation on images, and my first impression was that after reading one The value stored in matlab matrix was a gamma right from a JPEG file, so, I should write the following code: im = (double (('Myim. jpg'))) / 255) ^ 2.2; To obtain a matrix with values ​​in linear space. However, I tried the following: Generate a linear shield: X = 1: 256 shield (:, x) = ones (128,1) * (x-1) / 255 for; End Then I write it in jpeg file and read it again: imwrite (gradient, 'gradient.jpg', 'quality' , 100); gradient_jpg = double (imed ('gradient.jpg')) / 255; Now I expect the gradient and gradient_jpeg to be isolated, because as it was written as a JPG file and the second was not there, the latter gamma was correct. Both matrix exits I and I am the place where I do not understand. In the last test, I tried to open the same JPG image from Matlab and HDRops. Both images are shown on the same screen, but when I look at t

Spring | How to encode login password before sending to server -

I'm using spring protection for my web application I want to change password text coded before sending it to server Am Here's my code below: spring-security.xml & lt ;! - Authority Manager - & gt; & Lt; Authentication-manager aliases = "authentication manager" & gt; & Lt ;! - Authorization Provider - & gt; & Lt ;! - Remind Me Authentication Provider - & gt; & Lt; Authentication Provider Ref = "Remember MeAuthenticationProvider" & gt; & Lt; / Authentication Provider & gt; & Lt ;! - Authorization Provider JDBC User Management Service - & gt; & Lt; Authentication Provider User-Service-Rif = "jdbcUserService" & gt; & Lt ;! - SHA-1 Password Encoding Scheme to Protect User Credential - & gt; & Lt; Password-EncoderRiff = "Shadow Password Encoder" /> & Lt; / Authentication Provider & gt; & Lt; / Authentication-manager & gt; & Lt ;! - SHA-1

social networking - Share buttons to share chosen image -

I have many images on one page and I must create a separate set of share buttons for each image respectively. But when I use any external service, I have a random image sharing on the page with the selection. What is the method to select some one image to share with the share button? You need it if you are taking a lot of images on the same page Marking will be required to use it.

I would like to locate / validate genration my php error log on redhat fedora 20 linux -

I am working with the lampserver to generate an application and I'm getting a 'white screen'. I have looked for help through stack overflow and most of the posts suggest viewing the php.log file. I looked in php.ini and my error_log was empty and display_errors = on On this site, I read error_log = /var/log/php-scripts.log and display_errors = closed, I went to the application and went to / var / log / php -scripts.log was also not created The application was started and the file containing my php code was launched but my php code did nothing and php-scripts.log was still not present. I have created php-scripts.log and set permissions - RRR-RW- and again nothing was written in the tour file. Can someone help me in creating a log file and gaining some valuable information? Hi Arkasha Yes this appet is running on the localhost on my Linux laptop, as I have made changes I restarted the laptop, the file I created with Dell (it was still empty) ) My app ran aga

c++ - Run-Time Check Failure #3 - The variable 'ProfileTypePassed' is being used without being initialized -

I get the error Run-time Check Failer # 3 - Inner 'typed without profiles'. My code is below, I successfully execute it from its Firewall API MSDN, but in some way there is an error in this program. zero Get_FirewallSettings_PerProfileType (NET_FW_PROFILE_TYPE2 type profiles, INetFwPolicy2 * pNetFwPolicy2); Start HRESULT WFCOM (INetFwPolicy2 ** ppNetFwPolicy2); Zero Class 123 :: Get_FirewallSettings_PerProfileType (NET_FW_PROFILE_TYPE2 ProfileTappaced, INetFwPolicy2 * pNetFwPolicy2) {ProfileTypePassed; WFCOMInitialize (& amp; pNetFwPolicy2); VARIANT_BOOL bIsEnabled = FALSE; NET_FW_ACTION action; HRESULT hrComInit = S_OK; HRESULT HR = S_OK; TicSocialAmilement * msg31 = New Ticusal Element ("Firawal"); TiXmlElement childText0 ("Type"); TiXmlNode * childNode0; CString sTemp; HrComInit = CoInitializeEx (0, COINIT_APARTMENTTHREADED); // RPC_E_CHANGED_MODE Ignored; This means that COM has already been started with a different mode. Since we do not care

angularjs - Angular.js with JsFiddle and dynamically changing a ng-controller value -

I try to write my first angular.js application and jQuery < / strong>. There are many more calls in this, who have their own ng-controller . I am trying to change the value of the NIG controller to output different vacancies in the DEV announcement. I am working on the remaining calls and the data has been displayed, so now I want to use the buttons which will be able to retrieve and display in the main DIV to select the following data. This value has changed in the ng-controller value, but it did not execute the new ng-controller function. So to get help, I tried to make a JSFDial, but I have made some fundamental errors because the buttons do not work, with a new set of values, ng-controller Bella An alternative solution can be, but I can not find one. / code> Try this clear code, angular JS html & lt; Div ng-app = 'myApp' & gt; & Lt; Div ng-controller = "controller" & gt; & Lt; Button ng-click = &

javascript - EmberJS when to use a view? -

I am a new EmberJS user, so I am trying to understand the main components of the API and the framework. A key concept I am having difficulty in holding my head is right when using Ember.View vs. Ember.Component . For my understanding, Ember.Component is a way to create your own markup / tag in a template, but when I read the writing on the Amber site, I still can not understand that when Will anyone use a scene vs. a component when does it use a ember.Component versus an Ember.View ? I would like to see more examples of when Ember.View is important and understandable but I am not receiving it. Many times I can write markup directly in my handler template and use amber I can completely stop doing taxes. I can not think of a case where it would mean to use one. Take a look at this: In Amber, a view Always connected to the controller works as a reference to the data provided for a controller view, as well as also acts as the handle of events in the scene. For amb

c# - Filter by unmapped parameter -

Text after "div class =" itemprop = "text"> How can I declare a parameter ( id ) and add it to where NHibernate In part, select part of ICriteria API announcement @ids XML =? '& Lt; ScopeIds & gt; & Lt; ID & gt; 417444AC-6C57-4CB7-91E1-6E0B5832EDBB & lt; / Id & gt; & Lt; / ScopeIds & gt; Select * Where from MyTable P / * Other criterion list * / and @ ids.exist ('/ ScopeIds [id = SQL: column ("ScopeId")]' '= 1 There may be a way SqlProjection : // source Xml piece xml = "& lt; scopeIds> 417444AC-6C57-4CB7-91E1-6E0B5832EDBB "; // This SQL statement represents XML creation and = "Cast ('' to '.exist' var will call sql + xml + '' as XML)" + ".exist ('/ ScopeIds [id = sql: column (\ "scope id \")] '' + "AS idexists"; // Here we declare the SQL Project, NHibernate how to manage the low-level projection on

javascript - Leaflet Not Adding Tile Layer to Bottom -

I am helping my students with a map of some data related to Hurricane Sandy. They have four tile layers (MapBox Street, Map Box Satellite, NOAA Satellite, and NOAA Induction) and several vector layers. When this is first loaded, Map Mapbox shows Street Tile with some vector data at the top, as well as the ability to convert the MapBox satellite layer into a base map. Users can then add the Ination Layer to the top of the base map (the Ination Layer is very complex so that it needs tiles instead of the rendered polygons). The problem occurs when you switch base map layers after the infinity layer is added to the map. My students use the function to add a new base map layer below (after removing old ones), but for some reasons only the vector is added under the layers, not the bottom of the induction tile layer. When the base layers are switched out, you can clearly see that the flood tile layer is still there, it will not move to the top of the new base layer. Do anyone know w

c# - Cache Dataset in session to fetch on demand -

I'm considering WCF or Marmot as a framework for rental service, where business / legacy The code that needs to be accessed requires Delphi to have a foundation in the demonstration project. Application should be prepared for balance balancing. The rest of the service is the desktop windows of the desktop, these desktop clients allow the user to view large amounts of data, which have huge results in SQL statements. What is the best way to apply a service to cache a record set and to consume it slowly through a reissue service, can a good example show? RecordSet should be cached in session, as long as the customer does not complete the consultation or decides to reach the fetch. I am looking for the right architecture? Enabling load balancing will work in WCF? Due to the record set being cadeted on one server, along with line requests, if any, should come to the same server. Both WCF and mORMot have the same high-performance kernel-mode http.sys share the server both

unix - converting to ksh shell script -

I'm new to shell scripting. Has anyone helped me convert it into a regular ksh based script? Thank you. T = / KK / RS / Tools; U = $ T / Upgrade MV $ T / RO / YouTube $ U / RA / UPDAT.AR D $ 7 CD $ U; Grape "^ br" config .alpha & gt; Config.br./ConbaseUpgrader config.br ra_updates.br.d712 s not there To do a lot, it's a practical ksh code, but to make sure that the ksh interpreter runs it, add (as the first line in the script), ksh "shebang", i.e. #! / bin / ksh T = / kk / ras / tools U = "$ T" / Upgrade MV "$ T" / ra_updates "$ U" /ra_updates.br.d712 CD "$ U" grep "^ BR" config.alpha & Gt; config.br./ConbaseUpgrader config.br ra_updates.br.d712 s This is almost always good practice to circumvent variable references with dbl-citations. I have added them here. Ensure that chmod 755 myScript.ksh is appropriate. Pre> IHTH

How to create mobile apps using visual studio -

I'm interested in building mobile applications. It is possible that it is possible to create an app using Visual Studio 2010 Ultimate. What is the difference between Visual Studio 2010 Express and Visual Studio 2010 Ultimate? What platforms do you depend on for the Windows App - Windows Phone / Android / iOS For Windows Phone - You can download for VS2010, which will allow you to create a mobile app. For the differences in the versions - the content. With the last you have more project templates, tools, more programming languages ​​are supported and paid, while Express is a free version with low content for .

Calling a perl script from bash/shell script -

I am trying to call a Perl script (from the shell script) which is located in different directories, On which this environment is called from the cron: #! / bin / bash # triggerCron.sh - Set different environment, set path for perl script, call script TMP_HOME = / home / localweb / htdocs / cgi -bin / user1 / localroot if ["$ 1" = "dev" ] || ["$ 1" = "Ut"] || ["$ 1" = "prd"] Then "$ 1 obitigrar cron.pling calling" export PATH = $ TMP_HOME / $ 1: $ PATH $ resonate the path ./OBTriggerCron.pl "complete." The second "val is not set: $ 1" echo I was thinking that I could export the path first, then call the script ... then it is just a crossbaby that Looks: 304 * * * /usr/bin/triggerCron.sh dev 30 4 * * * /usr/bin/triggerCron.sh Usage 30 4 * * * / usr / bin /triggerCron.sh prd But when I run it I get: bash-3.00 $ trigger cron.Des dev dev obitrger cron .pl / home / local web / htdocs

ssh - Remove line in host's known_host file through Vagrant -

I have compressed a question - works only once in relation to a MySQL from SSH connections - my hosts The known_hosts file in any contradictory line of the computer. Basically, I can not like my database GUI because the key is different for the same IP address (re-provisioning, reloading etc.). Once I delete any offensive line, I can just get it right. So, through the shell command of the valentine (which I provide) I host machine ~ / .ssh / known_host file? Edit: I have found a temporary solution that includes a ~ / .ssh / config file (this includes the use of a private IP address ): .. Host 192.168 * * StrictHostKeyChecking A UserKnownHostsFile / dev / null You should let in. There is no real improvement, because this type of fix can be a matter of concern. See below for a better answer. Sorry to remove from you what you need! Changing HOST files from Vagrantfile: What you really want is very simple. Vagratfile is interpreted by the warrant ever

python - error when using tkinter + sqlite3 -

I'm trying to use sqlite3 in a guinea here, and when I'm using geo Try to compile the code, return this error file "/home/armando/Documents/curso/python_projects/sqlite3.py", line 3 syntax error: non-ASCII Python_projects / sqlite3.py on character '\ xc3' file / home / armando / document 3 / line / 3, but no encoding is declared; How can I solve it? Thanks P> Light and Peace! see p. 263 - You must declare your source at the top of the module Your encoding: #! / Usr / bin / python # - * - coding: utf-8 - * - Replace UTF-8 with the encoding that you saved the file.

c# - Windows Phone 8.1 check if password set else load new page -

I have a similar situation in which I have a login page which is my MainPage.xaml file but I have a And the page is called SetPassword.xaml which I want to load if the user has not yet set a password. Basically this is the first time that the app loads after installing it. I've spent a few hours trying out many different solutions (from which I linked), but I am not getting anywhere and it seems that many solutions are either WP7 or WP8 And something like that has been resolved for the new WP8.1. This is a basic check using Windows. Storage that I see if a password has been set or not. Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder; If (local settings.value ["myPassword"] == faucet) {Debug.WriteLine ("password is not set"); This.Frame.Navigate (typePassword); } else {Debug.WriteLine ("The

c# - DataGridViewCombox Refresh Windows Form -

I am working with a DataGridView which has a compoundbox in the Windows form I Data Gridviewview Datatat Retrieves data from There is no problem with data populated for datagrid view, but combobox does not refresh. When this is clicked it will refresh only with the correct values ​​ I am not very familiar with datagridview control or an expert in C #. I inherited this project from the previous developer, who had left the company. Anyone can understand the way to refresh the DataGrud viewbox, when Datagridview data source is rebooted. The current code is the phase. Create data table Null DatagridView DataGridView.DataSource = DataTable How to refresh datagridviewcomboxcolumn after this? Thanks for the help. I will try the event DataGridView. Zero DataGride View 1_CurrentCellDirtyStateChanged (Object Sender, EventArgs E) {if (dataGridView1.IsCurrentCellDirty) {dataGridView1.CommitEdit (DataGridViewDataErrorContexts.Commit); Edit} Remember to register your eve

javascript - hidden field value contains [object object] -

I am setting hidden field values ​​in jquery script, but hidden fields have result values, in which [object object] Here are the values; "[Object object], 22-Apr-2014" script var indx = 0; var hdfield = $ ('# hdlstVisitDates'); var lst = $ ('# lstVisitDates'); var option = $ ('# lstVisitDates option'); $ (Options) .each (function () {if (indx = 0) {hdfield = $ (this) .val (); indx = 1;} else {hdfield = hdfield + ',' + $ (this) .val ();}}); $ ('# HdlstVisitDates') val (hdfield). hdfile with $ ('#') < p> HdlstVisitDates') because you are going to overwrite the value later, if you have if (indx = 0) { which will always evaluate false, Should be (if index == 0) { var indx = 0; var hdfield; // = $ ('# hdlstVisitDates'); Why this? var lst = $ ('# lstVisitDates'); var option = $ ('# lstVisitDates option'); $ (Option) .each (function () {if (Indx == 0) {hdfield = $ (this)

javascript - Full Width Image With Smaller Parent -

I am trying to break the image with a page design to fill the full browser width and scale with resizing in CMS On the kind of system I am They also have text content on the images. It would be great, but not necessarily. Slideshow can do this for slideshow, but I have not seen anything to push just one image. CMS can be output page such as: ... more or less You can get this very easily with background: url () on your div example To see: On the code: .image {background: url ('http: / / 37.media.tumblr.com/e615708905cc9df81f901c06ae4afe1e/tumblr_n21ltnVLtz1st5lhmo1_1280.jpg '); Height: 300px; Status: Relative; } What happens is that the device has been blocked as a default view, so it will be extended through the entire page. Now, how to add text to the image? You can only put it inside the box, but for better control I can give it a full position. Here's the bella: .image h2 {status: absolute; Top: 125px; Correct: 50px; } In addition,

android - Method db.delete some rows? -

I have 4 fields in the table (note 1, note 2, note 3, note 4). I want to delete all the data contained in note 1 and note 2 . I want to add logic to the method db.delete , but I have trouble. Public Zero Deletion () {SQLiteDatabase db = mHelper.getWritableDatabase (); Db.delete (Note: TABLE_NAME, blank, blank); } Delete always deletes entire rows. In the specific column to clear the value, use an update query, for example ContentValues ​​cv = new ContentValues ​​(); cv.putNull ("Note1"); cv.putNull ("comment2"); Db.update (NoteABABLE.TABLE_NAME, CV, empty, empty);

jquery - Ajax set variables in realtime, and/or toggle switch depending on a .txt file -

I'm currently creating a web interface for home automation. I am able to turn the lights on and off, but two With the different buttons I want to create a button that either closes or stops and gets it from the file on the server. The file is something like this: 1001 = 0 1002 = 1 1003 = 0 Note: the left digit is the light id and the correct number is the state when the button is clicked on A shell command is executed and the status of the clicked ID varies between .txt file (which I have to work on). Now I have to see that without reloading the changes without any changes to the page opening from all the devices I was able to get content from the file and display text, but I have no success in setting the variable: 1001, 1002, 1003, ... '0' or '1 '. Is a Simple .txt file the right choice? Or is there a way to test the status for each specific ID if it is true or false, without the variable set? Can you help me? Thank you. You can not call d

How to create a redirect in PHP if the url is a specified? -

After I want to redirect local hosts to my ip in a file. If I see it with my IP then there is no redirection I have some code writed but do not do any work "; // resonant $ _SERVER ['SERVER_NAME'] $ _ server ['REQUEST_URI']; // if $ real_link =; // if $ _SERVER [REQUEST_URI] = "/docs/headertest.php" {// header ('location: http: //MYIP/docs/headertest.php')}; // $ url = "$ _SERVER [HTTP_HOST] $ _ server [REQUEST_URI]"; // echo $ url; // if $ url = "localhost / docs / headertest.php" {// resonance "AD";}; // headers ('location: http: //MYIP/docs/headertest.php');}; $ url = "http: //" $ _ Server [HTTP_HOST]. $ _ Server [REQUEST_URI]; $ Localhost = "http: //localhost/docs/headertest.php"; If $ url = ($ local host) {header ('location: http: //MYIP/docs/headertest.php');}? & Gt; Thanks. should be: $ url = "http: / / ".. $ _ Server [HTTP_HOST] $ _ server [RE

database - Displaying data in the Data Grid View? Access, C# -

Image
I want to calculate the total value and display it in the data grid view. The fourth column does not retrieve information from the database, so I do not know how to do this. Here looks like a GUI: < P> Even I still have the code ... double colonel = 0; // Set column total 0 foreach (DataRow currentRow in itemDS.Tables [0] .owsows) {// Add data grid view avowadgrid view Rows.Add (currentRow [1]. Ostring (), currentro [2]. Ostroong (), currentro [3] .restring ()); // Item item and Quant = Convert.ToDouble (currentRow [1]) variable item for quantal and value; var priceEach = convert Repeat (Current Rau [3]); // Multiply the amount of items by the quantity of the item, double sub-total = item Quant * priceEach; // Do this for each line Total + = Sub Total; } // Display subtotal subTotalOutput.Text = colTotal.ToString (); // Calculate the double tax of tax = colonial * .073; // Perform total tax tax. Text = convert Toasting (tax); // Add subtotal and total tax double totalp

Clean code - best way to compact code in Java -

I have a code that looks like this: for (int i = 0; i & lt; a; i ++) {List & lt; Integer & gt; List = element a. G (i); Some class RG = new classes (list, A, method A (I)); Int results = rg.generate (); Var + = methodA2 (i, result); } (Int i = 0; i & lt; b; i ++) {List & lt; Integer & gt; List = element B.get (i); Some class RG = new classes (list, B, method B (I)); Int results = rg.generate (); Var + = methodB2 (i, result); } How can I avoid this code recurrence? I can create a function that does that, but what is the different ways to do it? with Java & lt; 8 You can create the interface (note that Java 8 already has a IntFunction interface): interface intefunction & lt; A & gt; {One apply}; } M (Element A, A, new interfunction and Lt; A & gt; () {Public A (Int.) {MethodA (i);}}); and your method will look like this: Private zero I (collection (I left methodA2 for conciseness: you will need a second interface in w

java - redirect page to login page on session time out in spring mvc without using spring security -

It is easy to do this with spring security but what if I am not using Spring Security and in Spring MVC " The session expired "message with the user want to redirect the user to login. Is this a specific method of spring? Yes, you can use the following snippet. Try to include this line in the header of the page, change user attribute according to user session object. Http session session = request.getSession ("user"); If (session! = Null & amp;; session.isNew ()) {// do something here} and {response.sendRedirect ("/ redirect_the_page.jsp"); }

qt - How can I know the absolute position of the text input cursor in a QTextEdit? -

QTextEdit is apparently a text concert () method that gives a QTextCursor, but it has a cursor to modify the document I do not see any way to get the actual full (or widget relative) widget of the blinking cursor in GUI. How can I retrieve this information? In QTextEdit there is a method called cursor (), in which the position of the position of the QRect cursor is displayed. . QRect QTextEdit :: cursorRect (const QTextCursor and cursor) const returns a rectangle (in the viewport coordinate) Includes QRect QTextEdit :: cursorRect () const Returns a rectangle (in the viewport coordinates), which includes the text editing cursor. QRect coordinates will be able to provide

DOM Scripting Javascript, set element value -

I aim to add a button to the screen through the click of any other button. I can successfully add them, but they are empty (i.e., no text). I tried to determine the value with this technique: addButton.setAttribute ("value" "click me"); It has been unsuccessful, the odd thing is that I was able to set the element ID successfully with the set attribute function. Then I tried the following: var x = document.getElementById ("buttonId"); x.value = "click me"; The above button did not have to be added at all. Maybe I'm missing something but I do not think why the first method will not work. Note: All of these buttons have been made to fly so that the standard: & lt; Input type = "button" value = "click me" /> will not be enough. Any help appreciated. addButton function (elementId, value, name, type) {// an input type dynamic Create form var element = document.createElement ("Inpu

JSON - formatting best practice -

For Jason, when you keep an array of objects, is considered the best practice? Do you name the array and then put it in the objects or do you add an additional name to each object within the array? Example # 1 (The car has been named inside cars but additional "{}": {"car": [{"car": { Example # 2: The name of the car has not been given. Just an object inside the car orange: > {"cars": [{}, {}}} Jason was trying to work on another with another party and wanted to make sure that We are specifying JSN schema properly. First Format Bhav You can change it as it is: <">" car ": [{" car ": {}," driver ": {}}, {" car ": { } "Driver": {}}}} No changes in code processing the original layout.

html - why is one div not visible? -

यह div संरचना है: & lt; div class = "clear clear" और gt ; & Lt; div वर्ग = "ब्लॉक गुलाबी फ्लोट" & gt; & lt; / div & gt; & Lt; div वर्ग = "ब्लॉक ब्लू फ्लोट" & gt; & lt; / div & gt; & lt; div वर्ग = "ब्लॉक नारंगी फ्लोट" & gt; & lt; / div & gt; & Lt; div वर्ग = "ब्लॉक हरा देखें" & gt; & lt; / div & gt; & Lt; / div & gt; मैंने जो देखें नाम दिया गया वर्ग जोड़ रहा था, जिसने हरे रंग की बॉक्स को ज़ेड इंडेक्स 1000 दिया था। लेकिन मैं अभी भी बॉक्स नहीं देख पा रहा हूं। मैं इसे बिना एक बोट को छोड़कर बॉक्स देखना चाहता हूं जहां यह है। इसे .block में जोड़ें: स्थिति: रिश्तेदार; z- अनुक्रमणिका केवल गैर- स्थिर तत्वों के लिए काम करता है।

java - Is that valid to use while(true){ //Processes }? -

In the program on which I am working, I have to write process like small daemon so that some small services on different threads Can meet Is it legal to do something? while (correct) {// processes} Does this display stand create any problem in the program for the point? What are the options? It is better to use a scheduled Excel service and program to repeat it There is a possibility that you schedulwy fixed fixes which pauses between the tasks. Any infinite looping block can drain your CPU. It is not dangerous, however: while (true) {// work thread. Sleep (500); }

asp.net mvc - get the full path of a file (Not for upload!) -

First of all I apologize if a person already answers this question but I am looking for an answer Was and my specific questions Here's what I want: I want to get the full path of a file (local file path), I do not want to upload the file using my asp.net, instead I am using the dropbox API, and it's full path This locally required local file to work properly (except for Firefox because they do not allow it for security reasons). But I'm able to get the full path with Internet Explorer and I am using IE 11 to: Form ["Fileuploadcontrol"]. Tostring (). As I said it works for IE but only when I deploy it at local level does not work and the local server takes the path. Maybe I'm not using the right control, but I'm just a file browser where I can get the full file path. Once again: I do not want to upload the file, I have to give full path to the Dropbox API Apart from this there is no security problem with my browser. I can change my settings manual

sql - Access VBA: Get difference in value between current and previous record -

I created a report based on this link based on queries: It gives me the list of records with values: (primary) · ID ....... for the first time .... semender ..... diameter .. ... owner 1 ........ 100200 ....... 01 ............... 150 ......... ..... peter 2 ........ 100200 ....... 02 ............... 138 ....... ...... .Peter # 3 ........ 100300 ....... 07 ............... 112 ..... ...... ... John In the descending order by the diemetral, I create a new column of the query type. I know that the difference between the first and the second records is counted, then between the third and the second and so on. In this way: (primary) ID ....... First news .... sandydam ..... diameter ..... defhidametral ..... owner 1 ........ 100200 ....... 01 ............... 150 ............. ..... ........................ Peter 2 ........ 100200 ....... 02 ................... 138 ................. ................... ... Peter 3 ........ 100300 ....... 07 ............... 112 ......... ..

c - Is it necessary to check for endianness with unsigned 8-bit integers? -

I am sending data between C TCP socket server and C # TCP client. The C # client is sending data. The .NET Framework Type is an array of System.Byte, which is an unsigned 8-bit integer. From the C server, the data being sent is an array of C, type four, which is also an unsigned 8-bit integer. The interval I have read is that when dealing with 16 + bit integers, that is, when you have more than 1 byte, order bites are either in Little Endian and Big Endian. Since I am only sending 8-bit arrays, do I need to worry about endlessness? I have not been able to find a clear answer yet. Thank you. Your intuition is correct: An end to 8-bit integer is irrelevant; It only comes in play for those types which are more comprehensive than a byte.

CSS drop-down menu, link cut in half -

How do I create a pure CSS drop-down menu, and I'm seeing a strange issue I have searched and nothing has been found useful. If you hover over the blog link, you will split "case studies" by half, the "case" and "study" on the line next to the next line. I checked my HTML and it looks fine. It's been a long day, maybe I'm seeing something clear. : O << / p> I still have this: & lt; nav class = "p-nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; About & lt; / A & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Showcase & lt; / A & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Service & lt; / A & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Blogs & lt; / A & gt; & Lt; Ul & gt

java - How can i create a custom Jackson Mapper? -

I want to make a data base for Google charts with Jackson that I can easily create a json file .. < / p> I use this Jackson version: & lt; Dependency & gt; & Lt; Group & gt; Com.fasterxml.jackson.core & lt; / Group & gt; & Lt; ArtifactId & gt; Jackson-DataBind & lt; / ArtifactId> & Lt; Version & gt; 2.2.3 & lt; / Edition & gt; & Lt; / Dependencies & gt; I have the following classes (Example creates only rows at this time): Public class datatyll serializable {Private constant last long serialvarsian UID = 1 L ; @Jesenproperty ("lines") Private list & lt; DataTableRow & gt; dataTableRows; Public listing & lt; DataTableRow & gt; GetDataTableRows () {Data data layers; } Public Zero SatDATETableRo (list & gt; DataTableRow & gt; DataTables) {this.dataTableRows = dataTableRows; }} Then I have a datatyrere class Public class datatyable applies Serializable {Personal Static

r - regex variable substitution in "replacement" argument -

I have a string in R. I want to find the part of the string and add a variable number of zero. For example, I have 1 2 3 . Sometimes I want to be it 1 203 ; Sometimes I want it to be 1 2000 3 . If I store the number of the enclosed ones in a variable, then how can I use it in the "Replacement" part of the sub command? I have a mind code like this: s < - '1 2 3' z & lt; - '3' sub ('(\\ s \\ d) (\\ s. *)', '\\ 10 {Z} \\ 2', s) Code returns 1 20 {z} 3 . But should I get the code like this? One way s <- '1 2 3' z But this is a little clunky. Try operator associated with package: required (string ) "abc"% stri +% "123abc" ## [1] "abc123abc"

java - Custom cell editor not behaving correctly -

I created a custom cell editor to display an error message when the user enters wrong information, but having a problem It seems as though I have an inquiry that it works fine, but if I add another check or I will break the whole thing with another probe and display an error, then it does not make any difference I do what I am doing. Edit: Another question, if I want to print it soft hyphen in my second statement, then I did not parse the parsing code correctly. It prints my error how can I fix it? It is decided In your case two true statements of the statements are true Try the values ​​and you will see what happens if this is not a man or if it is a meter, then this is not a man, so LHS is true. If this is a man, then it is not that it is so true. I believe you want & amp; Amp; . Instead of

actionscript 3 - How to get rid of UITextField padding? -

Image
No padding was ignored due to no padding being in existence? I'm really confused here I do not want to red areas (please ignore the potato colors, I'm just debugging) Debugging using Flash Firebug - with the plus in the top left The dark blue border shows the entire UITextField inside my label component. I was found around the web about how to properly measure the text to fit the container and it is a breaking issue for those fixes. Does anyone have any idea how to get it ? I just want to scale my text dynamically when the window is resized and the result of the container changes as a result. EDIT: It is important to note that the label is applied to the scale, I can tell that the padding is still when it is small, but without scaling it will pay very little attention If I have problems like this, then I debug it using FlexSpy ... To observe the elements, and to change the qualities in real time, to get things like this. Electricity easy. This may be of some h

Rails 4 fomatting with slim error -

I have this simple ARB code that works perfectly, my i18n.yml Combined for file. This idea is to get the customer's edit.html.erb page, get the title of the page in my en.yml file, and enter that title with the @client pass .fullname variable such as: & lt; H1 & gt; & Lt;% = t ('client.edit.title') ,: current_client = & gt; @ client.fullname% & gt; & Lt; / H1> Now, if I am in the process of translating my ARB files into thin then the result of that line of code h1 = t ('client' Edit.title '),: current_client = & gt; @ client.fullname but pass this will to the en.yml file instead, it throws this error: /app/views/clients/edit.html.slim:1: Syntax Error, Unexpected ',', Expected '' '... tty2 = (T (' client.edit.title '),: current_client = & Gt; @ client.f ... ... Can anyone know what I'm doing wrong here? < The hash parameter option method must be passed within th

mysql - SQL - Products with No Sales -

I am trying to list all the products that have not got any sales. I'm really close, but I'm trying to use the existing statement to display all the product IDs displayed in the product table, but not in the orderline table; And so there is no sale my code is as follows; Products from the product. Select product, enter productivity on the product. Productivity = orderline.producted where not present (orderline from orderline. Select the product type) Order by the producer You can only export PRODUCT. PRODUCT WITH LEFT JOINSERLINE USING (productid) WHERE orderline.productid is the order of by product. All of the rows in productid LEFT JOIN list product , even if the orderline . In that case, orderline contains all the columns in the NULL values ​​that are the ones that you want in the result.

perl package inside a package -

I need to create a normal package that will be used by other packages, such as: common_1 pm is in: Package Normal; Use Test1; Use test2; and use this package in another package, as follows: contents of test_case1.pm: package test_case1 ; Use mangoes; // it should use test1 and use test1 and test2; Use test4; Each trial * .pm is again a separate Perl module, can I write packages like the above? I'm new to the opul in Pearl, thanks in advance for help. Yes, this can be done; Examples of such things are, and I want to use this as a tool for building such a module. These are examples of how this can be done: syntax :: collector: package general; Use syntax: collector-collection = & gt; Use Q {test1; Use test2 0; }; 1; or by importing: in: Package Normal; Import :: In use; Use test1; Use Test2; Sub import {my $ caller = shift; test1- & gt; Import :: ($ Caller); test2- & gt; Import :: ($ Caller); } 1; If test1 and test2 are actually o

Storing values of jQuery Mobile optgroup in SQLite -

I have an optgroup like this for example: & lt; Select id = "opt1" multiple = "multiple" data-base-menu = "wrong" data-icon = "grid" data-icon = "left" & gt; & Lt; optgroup label = "optgroup option" id = "op" & gt; & Lt; Option value = "option1" & gt; Option 1 & lt; / Options & gt; & Lt; Option value = "option 2" & gt; Option 2 & lt; / Options & gt; & Lt; / Optgroup & gt; & Lt; / Select & gt; This is in the jQuery mobile style and you can select many boxes. I was thinking, once you select several boxes, it comes in the form of a list that is separated by commas on the selection menu: option1, option2 (if both options 1 and Option 2 is selected) How do I store option 1 and option 2 as separate values ​​in my database? For example, if I have a column called "selectedoptions", then how would I like it: Selected

VBA Code for disable the Right Click option in Excel for the current Workbook only -

I have created multiple worksheets in my workbook. I want my users to not see the other sheets in Excel Since I want to disable the right click option in Excel Open Event. I have a piece of code: beforeforerightClick (ByVal as the object, bypass as the range, cancel as the boolean) with the private sub workbook. Cancel = True MsgBox ("Sorry ok above The above code runs only after the workbook is opened and runs the macro. I open the right-click option to open the workbook I want to open the workbook. Try it, different parameters ... Private sub worksheet- Click prefix (cancel as the target by target, as boolean) Cancel = True and All

php - A Restrictive WHERE IN SQL Statement With UNION -

मेरे पास निम्न तालियां हैं: कार्ड अपलोड टैग टैग_अपलोड : एक टैग और एक के बीच संबंध card_tag ​​ : टैग और कार्ड के बीच संबंध। कार्ड 1 का टैग "ईवेंट", " आरएमसी "और" रोगी "। अपलोड 1 का टैग" ईवेंट "और" रोगी "के साथ संबंध है। अपलोड 2 का टैग" ईवेंट "के साथ संबंध है, "Rmc", और "रोगी"। प्रश्न 1: मैंने टैग "ईवेंट" और "रोगी" का चयन किया है। इसे वापस करना चाहिए अपलोड 1, अपलोड 2, और कार्ड 1। प्रश्न 2: मैंने टैग "ईवेंट", "आरएमसी", और "रोगी" का चयन किया है। इसे अपलोड 1 और कार्ड 1 को वापस करना चाहिए। समस्या: मैं वर्तमान में निम्नलिखित का उपयोग कर रहा हूं, लेकिन जब मैं यह क्वेरी 2 करता हूं, तो प्रश्न 1 के रूप में वापस आ जाता है: क्या ऐसा प्रश्न दिखता है कि कोई कार्ड चुन सकता है अगर इसमें टैग होता है? क्या आप एक उदाहरण या तर्क प्रवाह का उपयोग देख सकते हैं जो आप उपयोग कर सकते हैं? यह मेरा पहला संस्करण है जो मैं चाहता हूँ नीचे ला

hadoop - Transferring hive table from one database to another -

I need to move a hive table from one database to another. How can I do this? Any person please help From 0.14, you can see the same metastore To move a table from one database to another, you can use the following statement: Use the old_database; Change the table table to rename new_database.table_a If table_a is a managed table, then the above statements also move the table data on the hdfs Will give

java - Where SSLSocketFactory and HttpsURLConnection work diffrerently? -

I have found a server with a self-signed certificate. I have imported it with a significant toll on my computer and compile the usage -Djavax.net.ssl.trustStore = blabla logic . When I try to run the following code: SSLSocketFactory factory = HttpsURLConnection.getDefaultSSLSocketFactory (); SSLSocket Socket = (SSLSocket) factory.createSocket ("MY_URL_DIGITS", 443); OutputStream OS = socket.getOutputStream (); os.write ("test request \ n" .getBytes ()); Os.flush (); Os.close (); Everything is fine and I can see the "test request" on the server. However, when I run: url = new URL ("https: // MY_URL_DIGITS"); HttpsURLConnection con = (HttpsURLConnection) url.openConnection (); OutputStream OS = con.getOutputStream (); os.write ("test request \ n" .getBytes ()); Os.flush (); Os.close (); I got javax.net.ssl.SSLHandshakeException: java.security.cert. By default, SSLSocket only checks if you trust the certificate.

osx - Detecting screen capture in progress -

How can I find out when the screen shot selection (CMD-Shift-4) is in progress? I have a custom window that is trying to behave like a menu (this situation comes out of the item). Part of this behavior is rejecting it when the user clicks on something else, which I find out using a CSECCTap. In a case where I want to make a click to dismiss don "t , is there any way to find out if the screen shot selection starts? I'm talking about some of your screen capture features: / usr / sbin / screencapture is running. I opened the Activity Monitor, sorted by Process ID, and hit the CMD-Shift-4 Screen Capture for the duration of the screen capture, at the top of the list.

mfc feature pack - AFX/MFC Intercept ALL command messages -

I am trying to use CMFCCmdUsageCounter to track order usage in my program. For this class I call AddCmd (ID_COMMAND); ID_COMMAND is handled / sent every time. Since there are thousands of ID_COMMAND in my program, which are handling millions of codes ... it seems impossible. I hope there is some easy way to stop all orders sent in my program. Is it possible to override the SendMessage () / Post Message () functions? (It is also not sure if it will get all the commands) Perhaps some MFC functions that pass through my virtual function in every way before passing it normally. I am sorry that my understanding of MFC / AFX message is limited. There is no help in trying to track ID_COMMAND usage. Take a look, in particular, I'll start with the WH_GETMESSAGE type hook provided you with a combination of hooks Can do.

c# - Creating interface with generic methods -

I'm trying to design an interface, so that's a common type of ID and a common method, just like Return of the class to apply this interface to the example: Public Interface IERTIT & lt; IDTIP, Method Return Type & gt; {IDType ID {Receive; Set;} Get the type of return method (); } Public Square Model: IEentity & lt; int, model & gt; {int ID {get; Set; } Get the Model () {// Something}} My question is, it seems silly to insert the second type of IERTI model into the model, because I I am already in the class of the model, how to find out how it should be some intelligence method (though it is necessary to set it before compiling time to use the common type). Is this any other solution that can help me get rid of this? The type of model during maintaining the gate method definition in the interface? In this context, there are two common ways to go about designing your classes and interfaces < / P> Which of these options really depends on how

html - Maintaining divs side-by-side in responsive design -

Image
As the starting user of the bootstrap grid system, let me use two code side-by-side Need to keep: omitted regardless of device is because this is a jQuery animation leaving a parent div to move in the right and move. How to apply the HTML of the green box to get this effect? Or is it purely a CSS media query case? Ignore blue box . This is what I have done so far: On the side of code> s and what you need: #panelviewer .ro {white-space: nowrap;} .panel1 {display: inline-block; Float: none; Background: #aaa;} .panel2 {display: inline-block; Float: none; Background: #eee;} demo