Monday, 15 March 2010

Stop working in Android Studio 's Emoulator -


I have a simple problem with my small calculator in Android studio (below is my code).

When I run it in the emulator app stop working. Can someone help me?

  package com.blah-blah.padideh.tamrin3; Import android App Importroid.os.Bundle; Import android.view.View; Import android.widget.Button; Import android.widget.TextView; Increases public class activity on activity {Calculation of the button = (button) SearchVBIID (R.B.ton); TextView firstnumber = (TextView) findViewById (R.id.editText); TextView Secondnumber = (TextView) Find VVBID (RIDActit2); Text view result = (text view) Find VVIIID (RID reset); Double number 1, number 2; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_farshid); Calculate.setOnClickListener (see the new OnClickListener () {@Override click on Public Zero (see V) {num1 = Double .apad double (first number .gettext (). ToString ()); num2 = double.parseDouble (secondnumber. GetText (). ToString (); Results .set text ("sum: \ t" + (num1 + num2) + "\ n" + "multiple: \ t" + (num1 * num2) + "\ n" + "Zero: \ t" + (Num1-num2) + "\ n" + "Split: \ t" + (num1 / num2) + "\ n" + "Good Luck");}}); }}  

package com.blah-blah.padideh.tamrin3;

Import android.app.activity; Importroid.os.Bundle; Import android.view.View; Import android.widget.Button; Import android.widget.TextView;

  the public class increases activityone activity {@ override protected zero creation (bundle savedinstenstate) {super.onCreate (SavedInstanceState); SetContentView (R.layout.activity_farshid); // Now you can find your ideas button count = (button) findViewById (R.id.button); Find Last Textview FirstNumber = (Text View) VVBID (RID Edit Text); Find final textview secondsnumber = (text view) VVBIID (RID.EditTet 2); Text view result = (text view) Find VVIIID (RID reset); Last double number 1, number 2; Calculate.setOnClickListener (see the new OnClickListener () {@Override click on Public Zero (see V) {num1 = Double .apad double (first number .gettext (). ToString ()); num2 = double.parseDouble (secondnumber. GetText (). ToString (); Results .set text ("sum: \ t" + (num1 + num2) + "\ n" + "multiple: \ t" + (num1 * num2) + "\ n" + "Zero: \ t" + (Num1-num2) + "\ n" + "Split: \ t" + (num1 / num2) + "\ n" + "Good Luck");}}); }}  

You can not try to find a view in an activity before calling setContentView ().


vba - Outlook checks e-mails only in specific time frame -


I need a VBA Outlook macro that checks the items in the folder in a specific time limit. At the moment my code goes through all the fairs in the specified folder, but this is not an option because the folder has thousands of mails, so the macro takes it forever to run, any ideas, how to check the script For example, Mail: 3/16/2015 to 12:00 to 3/16/2015 2:00 pm and do not check any e-mails outside of that time frame?

I have this at present:

  sub ExportToExcel () dim appExcel Excel.Application dim form of Excel.Workbook Slow Excel.Worksheet dim RNG Excel.Range dim WorkbookFile as String Dimmed Outlook as Outlook 2007.MailItem Dim NMS Outlook.NameSpace is retarded as the Outlook.MAPIFLDM FLD itm object in the form of an object's folder path of an existing Excel workbook and File name workbookFile = "C: \ Users \ OutlookItems.xls" 'Export Export Folder NMS = ApplicationSetup GetNamespace ("MAPI") is to handle potential errors with the Fld = nms.PickFolder 'Select Folder dialog box. If FFD is nothing, then there are no mail messages to export "MSBBC", vbOKOnly, exit "_" error sub alcif fld.DefaultItemType & lt; & Gt; OlMailItem Then there is no mail message for "export export", vbOKOnly, _ "error" exit subfifth fld.Items.Count = 0 then MsgBox "no mail is exported to the message", vbOKOnly, _ "error "Exit the sub-end if you open the Excel workbook and set the appExcel = CreateObject (" Excel.Application ") set WKB = appExcel.Workbooks.Open (workbookFile) set = wkb.Sheets (1) wks.Activate appExcel Application.Visible = true set RNG = wks.Range ("A1") 'Copy Item item in the mail folder. In each ITM fld.Items if itm.Class = Set up Outlook.OlObjectClass.olMail then msg = itm if InStr (msg.Subject, "Error in WU_Send") & gt; 0 and dated ("H", msg. ston, now) & lt; = 2 then RNG Offset (0, 4). Value = msg.Bydy set RNG = RNG .offet (1, 0) and end and end and end and sub  

and the problem is in this special part:

< Pre> for each ITM in fld.Items if itm.Class = Set up Outlook.OlObjectClass.olmail then go to msg = itm if InStr (msg.Subject, "Error in WU_Send") & gt; 0 and dated ("H", msg. ston, now) & lt; = 2 then

How do I tell the code to only look at the specified hour and time on the e-mail? Ignore the rest?

Thanks or your answers, comments and suggestions in advance!

Instead of going through all the objects in the folder instead of using the / or methods of the items Have to do. For example:

  sub DemoFindNext () dim MyNamespace Outlook.NameSpace dim tdystart Date dated tdyend dated date myAppointments Outlook.Items slow currentAppointment Outlook.AppointmentItem set as MyNamespace = Application.GetNamespace In the form of as ("MAPI") tdystart = VBA.Format (now, "short date") tdyend = VBA.Format (now +1, "short date") set myAppointments = myNameSpace.GetDefaultFolder ( OlFolderCalendar). Items set currentAppointment = myAppointments.Find ("[Start]> gt; =" "and & quot; and" "" and [start]  

In addition to this you can find the application class method helpful. The main benefits of using advanced search method are listed below:

  • Search The second thread is carried out in the advanced search system after running automatically in the background, Thread is not required to run manually.
  • Any type of type, mail, appointment, calendar, notes etc. are likely to be searched in any place, i.e. beyond the scope of a fixed folder
  • DASL queries Restrict full support for (custom properties can also be used to search) and find / locate the next methods can be applied to a particular item collection. . You can read more about this in the filtering article in MSDN. To improve search performance, instant search keywords can be used if Instant Search is enabled for the store (see Store IsInstantSearchEnabled property in Store category).
  • You can stop the search process at any time by using the stop. Method of search class

emacs24 - Use search script froma previous search emacs -


I'm an emacs newbie I use C-S "text" for the text I have an entry Instead of searching for it instead of writing it, how do I choose it? For example, there is a shortcut to remember the C-S "Text1" C-S "Text2" lesson 1, so when I search for it, I do not have to write it again?

If you press CS CS , then whatever you search for Will search last time. By using

MP you can run in search history and edit search strings as well. Press RET to continue the search.


java - Cannot run IntelliJ - NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment -


I am unable to start IntelliJ with your fresh install OpenSUSE 13.2

Login here: < / P>

  xybrek @ excerpt: ~ / idea-ic-139.659.2 / bin & gt; ./idea.sh OpenJack's 64-bit server VM Alert: MaxPermSize = 350m by ignoring the option; Support thread "main" 8.0 java.lang.NoClassDefFoundError was removed exceptions: java.lang.Class.forName0 (Native Method java.lang.Class.forName) class sun.awt.X11GraphicsEnvironment on (Class.java could not initialize:. 260) java.awt.GraphicsEnvironment.createGE (GraphicsEnvironment.java:102) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:81) is javax.swing.RepaintManager & on lt; Clinit & gt; (RepaintManager.java:226) javax.swing.JComponent.repaint (JComponent.java:4798) on java.awt.Component.repaint (Component.java:3303) javax.swing.text.JTextComponent.setEditable (JTextComponent.java: 1758) on javax at .swing.text.JTextComponent. & Lt; Init & gt; (JTextComponent.java:309) at javax.swing.JEditorPane. & Lt; Init>. (JEditorPane.java:199) at javax.swing.JTextPane & lt; Init & gt; (JTextPane. Java: 90) .intellij.idea.Main to com on com.intellij.idea.Main.showMessage (Main.java:221) com.intellij.idea.Main.showMessage (on Main.java:208). Main (Maine Java: 81) xybrek @ opensuse: ~ / idea-ic-139.659.2 / bin & gt; Java-version OpenZK version "1.8.0_25" OpenJDK Runtime Environment (Zulu 8.4.0.1-Linux64) (Build 1.8.0_25-B17) OpenZK's 64-bit server VM (Zulu 8.4.0.1-Linux 64) (Build 25.25- B 02, mixed    Opansyuesi your problem on the machine was able to reproduce, rather than with the installed fonts. you can decide whether x11 fonts installed by:  
  zypper install xorg-x11-fonts xorg-x11-fonts-core  

Oracle JDK worked because they have bundle and fontconfig Ig.properties contain proprietary fonts.


Chromecast debugging via port 9222 stopped working -


I've been using port 9222 to debug the Chromecast receiver code for more than a year. Today I stopped working

"You may have to select the Shield icon in the address bar to establish a connection"

No gradient icon instead of debugging URL This problem is spreading slowly on our site. Everything is enabled for the Chrome browser.

I tried to reboot the chromecast, reboot pc, chrome, canary beta version, etc. No happiness

Any help is appreciated.

Got the same problem.

I removed the Chromecast from the whitelist and added it again. Reset it

After finding a page with the link of appenzini (remote debugging (apenzene)).

Enjoy debugging console :)

Update: got another problem - Remover for connection was refreshed until I got the receiver in the Chromecast Developers Console Do not check guest mode


xml - XMLBean setting tag order -


I can successfully parse an XML file and create one. When I export XML, I am running into a problem because the tag should be in a certain order and put the XMLBin tags alphabetically. Any suggestion would be appreciated

  & lt; Line & gt; & Lt; Min / & gt; & Lt; Charge & gt; 5.00 & LT; Charge & gt; & Lt; ClientTotal & gt; 1.00 & LT; ClientTotal & gt; & Lt; Services & gt; R20 & LT; Services & gt; & Lt; DateOfService & gt; 2015/01/28 & LT; DateOfService & gt; & Lt; Units / & gt; & Lt; / Line & gt;  

VS:

  & lt; Line & gt; & Lt; Charge & gt; 5.00 & LT; Charge & gt; & Lt; ClientTotal & gt; 1.00 & LT; ClientTotal & gt; & Lt; DateOfService & gt; 2015/01/28 & LT; DateOfService & gt; & Lt; Min / & gt; & Lt; Services & gt; R20 & LT; Services & gt; & Lt; Units / & gt; & Lt; / Line & gt;  

I changed the order of the WSDL file tags given to the vendor and fixed it Issue


asp.net mvc - how to add multiple records from single page using ajax in mvc razor -


बेलो मेरी टेबल हैं

यहां मैं सर्वेक्षण और amp; इसके बारे में सभी प्रश्न।

अभी मैं सर्वेक्षण पहले बना रहा हूं, फिर प्रश्नों को जोड़ने के लिए अगले पृष्ठ पर जा रहा हूं; प्रश्नों से संबंधित विकल्प / उत्तर जोड़ने के लिए एक और पेज पर जा रहा है।

i.e। मैंने 3 पेज 1 बना दिया है। सर्वे जोड़ने के लिए 2. प्रश्न जोड़ने के लिए 3. विकल्प / उत्तर जोड़ने के लिए

यहां कई सारे सम्मिलन होंगे जो मैं बचाना चाहता हूं

अब मैं यह सब बात एक पृष्ठ में करना चाहते हैं & amp; एकल डालने के सभी रिकॉर्ड सम्मिलित करना चाहते हैं, मैं इकाई ढांचा का उपयोग कर रहा हूं ताकि मैं सर्वे ऑब्जेक्ट में सभी डेटा जोड़ सकूं। तो बस इसे डालें लेकिन मुझे नहीं पता कि मैं इसे AJAX का उपयोग कर एक पेज में कैसे कर सकता हूँ i.e.

संपादित करें: मैंने आंशिक दृश्यों का उपयोग कर रिकॉर्ड जोड़ने के लिए उपयोग किया। यह प्रश्न जोड़ने के लिए काम करता है लेकिन उन सवालों के जवाब जोड़ने के लिए काम नहीं करता है।


ios - UITableView With three section and three cell -


I am using three sections and three cells, such as
Section 1 cell 1
section 1 Cell 2
section 1 cell 3

section 2 cell 1
section 2 cell 2
section 2 cell 3

section 3 cell 1
section 3 Cell 2
Section 3 cell 3

but I am trying to customize with the following figure

section 1 cell 1 --- --- displaying user profile This section for
Section 2 cell 1
- This section showing multiple pictures
Section 3 Cell 1
- This section for comments related to images

Section 1 cell 2

This section displays user profiles
Section 2 Cell 2
- This section is showing many images
Section 3 cell 2

This section for comments related to images








Section 1 cell 3
Section 2 cell 3
Section 3 cell 3

Anyone help me solve this code

I recommend starting with a storyboard. Is this cell always a Do not matter (use stationary cells for your UIView in the Stotboard in the storyboard), or do you add cells programmatically Are planning on (use dynamic cells and define a prototype cell).

The following is a great tutorial on strobobs, which should help you get started:


web services - JIRA to ServiceNow Integration -


Is there a way for GIRA to listen to build build and configure it to be set up with tickets? Service Alteration Almost Almost Similar Information about JIRA Construction?

If so, what can I see on some plugins, listeners, web servers? Where can I create these configurations in Gears system settings? Is such an API already created?

This service can be easily completed with the new REST API. You can use "Table API" directly in the Change Request table. If you need to change any data before entering, you can define a conversion map using "Import API" and. If you are on the earlier version, which does not have a REST API, then there are some other web service options you can use.

Here are some links to useful documentation you can find:


javascript - Populating arrays after their definition -


I have a recipe containing a ul containing li Separate recipe content for page I am trying to get those elements and trying to store them in a JavaScript array within an object. I already know the title of the recipe, so I put that object property in title , but I do not know how many elements are there for each recipe. Val (), content: [ingredient, optional]} $ .eee ($ ('Ul.ingitals'> li>, h4'), function (index, element) {recipeobj.ingredients [index] .ingredient = $ (Component). Html (); recipeobj.ingredients [index]. Optional = false;})

If I try to console.log (recipeobj.ingredients) I get the error Uncaught ReferenceError: The component is not defined

There is no doubt that it is simple, I have to use arrays rarely in javascript So that Have a little experience with

open your console and run it

< Div class = "snippet" data-lang = "js" data-hide = "wrong">

  var recipeobj = {title: $ ('h3.title'). Html (), // content is now empty for the ingredients: []}; $ .each ($ ('ul.ingredients & gt; li & gt; h4'), function (index, component) {// name var name = $ (component) .html (), // find out what this Paste a new component in 'Optional' (use square here) optional = $ (component) .hasClass ('optional'); // array at recipeobj.ingredients.push ({name, optional: optional}) ;}); Console.log (recipeobj);  
  & lt; Script src = "https: //ajax.googleapis com / ajax / libs / jquery / 2.1.1 / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; H3 class = "title" & gt; Pork and beans & lt; / H3 & gt; & Lt; Ul class = "content" & gt; & Lt; Li & gt; & Lt; H4 & gt; Pork & lt; / H4 & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; H4 & gt; Beans & lt; / H4 & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; H4 square = "optional" & gt; Salt * & lt; / H4 & gt; & Lt; / Li & gt; & Lt; / Ul & gt; This output should be: 

 <">" title ":" pork "and" name ": 
"{Name:" pork ", optional: incorrect}, {name:" beans ", optional:" salt * ", optional: true}]} Incorrect}

php - Sort array of file lines by alphabetical -


I am reading a text file of email addresses and only outputing to the domain (with the @ symbol). I would like to make this list alphabet and then output to display on screen

My code is so far like this:

  & lt ;? Php $ file_handle = fopen ("file.txt", "R"); While (.fif ($ file_handle)) {$ line = fgets ($ file_handle); $ Parts = explosion ("@", $ line); $ Id = $ parts [count ($ part) - 1]; Echo "@" $ id "& lt; br & gt;"; } Fclose ($ file_handle); ? & Gt;  

How can I bring the list to alphabet?

This should work for you:

(Here I just click on the file Line. Then I go through each line from where I just array the array to the domain $ lines in the end I sort and print the array with it)

  & lt ;? Php $ lines = array_map (function ($ v) {return "@". Explosion ("@", $ V) [1];}, file ("test.txt")); Type ($ lines); External currency ($ lines as lines) $ line echo "
"; ? & Gt;

Example input / output:

  ab@x.com ac@a.de es@b.cu  
< P>
  @ a.de @ b.cu @x.com  

java - Bubble Sort with compare method not running -


This is a follow up to my previous question that I had asked yesterday. I have written a bubble sort method which analyzes an array of strings and returns the number of similarities, which provides the alphabet in order to order the method (assignment is to write several sorting methods and each Graph a number of comparisons to compare one, to see which is the most efficient).

This is my code:

  public static zero main (string [] args) {string [] test_array = {"bill", "fill", "Adam" }; / * System.out.println (compare ("orange", "boogie")); * / System.out.println (Bubble sort (test_array)); } Comparison of public static int (string A, string b) {int len ​​= Math.min (a.length (), b.length ()); // Looping through every character, if CH is less than chb, then method 1 returns, and so on. For {int i = 0; i & lt; len; i ++} {char cha = a.charAt (i); Four chb = b.chart (i); If (cha leftibbs; CHB) {return -1; } And if (Ch & gt; chb) {return1; }} // Now we eat for the length of the word because it can be the same word if (a.length () & lt; b.length ()) -1 return; Else if (a.length ()> gt; b.length ()) back 1; // appears to be the same string, then return 0. And return 0; } Public Static Ent Bubble Sort (string [] test_array) {Boolean swap = true; // variable to track the number of comparisons Int compNumber = 0; While (swap == true) {swapped = false; (Int i = 1; i & lt; test_array.length; i ++) for {// compn number compNumber ++; If (test_array [I-1], test_array [i]) & gt; 0) {// change variable by using a floating variable string logical = test_array [i-1]; Test_array [i-1] = test_array [i]; Test_array [i] = floating; Swap = true; } Else {swapped = true; }}} Return COMPNumber; }  

So the comparison method (given by array) compares two stars and determines whether they are in alphabetical order (return -1) or not (1 return) , Or the same word (return 0). Then, the bubble sort method compares the method to go through the array, and it then creates a switch, whereas the number of loops in my Vampan-NAB variable is computed (hence the number of comparisons).

It is compiled exactly, but it does not stop running unfortunately and does not return anything. I have waited 5 minutes so I have decided that something is wrong, maybe with my loop I am unable to find any problem, which has manipulated the parameters of many times, can someone help me? thank you in advanced.

"swap" will always be correct, so looping will never end. I think that you put swap = wrong in the second description


ruby - Remove empty value before converting string to array -


  आईडी = "1,4,5," idsplpl (',') = & gt; ["1", "4", "5", ""] ids.split (',')। Map (& to to_i) = & gt; [1, 4, 5, 0]  

इससे पहले कि वह शून्य हो जाए, मैं उसे खाली मान कैसे निकालूं?

आप

  आईडी =" 1,4,5, "ids.scan (/ \ d + /) का भी उपयोग कर सकते हैं। नक्शा (& amp; : To_i) # = & gt; [1, 4, 5]  

php - Curl download all files in a directory -


I am using PHP curl to capture files from a URL. The file names are currently hard coded and I am trying to create it so that it can download all the files in a specific directory. Any point in the right direction would be good. Thank you.

Please note that I have a "read" right in a directory, I do not have FTP access or anything else.

  Server_url: http://192.168.2.45 / Logfiles / server: server1 Files in that directory: 140512 ... 150316.log and increasing & lt ;? Php $ server_url = $ _GET ['server_url']; $ Server = $ _GET ['server']; // It needs to be changed for all files ($ i = 140512; $ i & lt; = 150316; $ i ++) {$ id = base64_encode ($ i); $ File_name = $ server_url $ I ' Log '; Curl_setopt ($ ch, CURLOPT_URL, $ file_name); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); // return data string as idle peer verification curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, FALSE); // // disabled host verification curl_setopt ($ CH, CURLOPT_SSL_VERIFYHOST, incorrect); // Real Browser Client String Curl_setopt ($ CH, CURLOPT_USERAGENT, "Mozilla / 4.0 (compatible; MSIE 5.01; Windows NT 5.0)" Spoof; $ output = curl_XC ($ CH); // Capture data in output variable if (! DIR ('sites /'. $ Server. '_ LOGS')) {MKDIR ('sites /' .a server. '_ LOGS');} If ($ output! = False) {file_put_contents ('sites /'. $ Server. 'LOGS'. '/ U_ex'. Base64_decode ($ id). '.log', $ output);} Curl_close ($ ch);}? & Gt;  

Curls supports FTP, You can use it to make a file and then download each file. I found an example using PHP curls in the previous answer.


basichttpbinding - WCF- Method unable to generate response. Is there any length limit for response header? -


I have a WCF method that is returning the custom list of objects and about 20K records have everything on my local machine Is working fine but is unable to generate any feedback on live server method. I am using the following binding configurations:

  & lt; Bindings & gt; & Lt; BasicHttpBinding & gt; & Lt; Binding name = "newbanding" offtimeouttime = "00:10:00" opentimeout = "00:10:00" sending timeout = "00:10:00" MaxBeferPol Size = 2147483647 "MaxBufrices =" 2147483647 "MaxRayservice MessageSize =" 2147483647 "& Gt; readerQuotas maxDepth =" 2147483647 "maxStringContentLength =" 2147483647 "MaxArray Lang =" 2147483647 "Maxbitespearred =" 2147483647 "MacNameTable reason =" 2147483647 "/>  & lt; / BasicHttpBinding & gt; & lt; / binding & gt;     

Itemprop = "text"> < P> Finally, I managed to fix it To decide & amp; fix, add the setting to the WCF server config below.

   Servicebeaviers> ; Behavior & gt; & lt; Data Contractor SiriLizer maxItemsInObjectGraph = " 2147483647 "/>    

How do I change hostname on Android? (and reachable by a ping?) -


I need to change the hostname of my tablet in my Android application. I think the idea of ​​"ping me-tablet" Have to work properly. To accomplish this, I have given the following commands (programmatic) through ADB:

  su setprop net.hostname & lt; New_hostname & gt;  

When I give it:

  getprop net.hostname  

However, the change was not notified on the network So ... if I ping the device, then nothing works.

I have seen this resource: but I'm not sure that it solves the problem.

Solution (such as manually editing the host file, though I should do it for every connected device ... or change the router directly that I can not do all the time), but this It does not seem possible.

Any thoughts? Thanks :)


ios8 - What are the iOS 8.0+ NSCalendarUnits? -


After

I have seen that all NSCalendarUnits (e.g., NSDayCalendarUnit ) is What is the officially deprecated

replacement of iOS 8.0?

They are replaced (just look in the SDK):

  Ns_options (Nsuintegr, Nsklendrunit) Teepedefa {Nskalendrunitera = Kkfslendrunitera, Nskalendrunityear = Kkfslendernityar, Nsklendrunitmont = Kkfslendrunitmonth, Nskalendrunitday = Kkfslendrunitdy, Nskalendrunithur = Kkfslendernithur, Nsklendrunitminute = Kkfslendrunitminute, Nsklendernitsekond = Kkfslendernitsekond, Nskalendrunitvikde = Kkfslendernitvikde, Nskalendrunitvikdyordinl = Kkfslendernitvikdyordinl, Nskalendrunitkwartr Ns_inm_avelebl (L0_6, 4_0) = kCFCalendarUnitQuarter, NSCalendarUnitWeekOfMonth NS_ENUM_AVAILABLE (10_7, 5_0) = kCFCalendarUnitWeekOfMonth, NSC AlendarUnitWeekOfYear NS_ENUM_AVAILABLE (10_7, 5_0) = KCFC CalendarAnonymousWorker , Anssiellenderanytfoarviikofiyr Ans_anyuemaiawaiaara (L0_7, 5_0) = Kesifsi Kailenderamerikifoyr Waikaiyr, Anssiellenderantanskend Ans_aanyuem_availael (L0_7, 5_0) = (L & Lt; & Lt; 15), NSCLender Unit Calendar, NS_ANU_Avibal (10_7, 4_0) = (1 <20), NSCLenderNumbertimeNSS_Anum_VEVLLE (10_7, 4_0) = (1 <21), NSEAR Calendar NNSN NNNNNNN_DePreset (10_4 , 10_10, 2, 8, 8, NSCalendarUnitEra instead ") = NSCalendarUnitEra, NSYearCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_4, 10_10, 2_0, 8_0," use NSCalendarUnitYear instead ") = NSCalendarUnitYear, NSMonthCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_4, 10_10, 2_0, 8_0," NSCalendarUnitMonth Usage Instead ") = NSCalendarUnitMonth, NSDayCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_4, 10_10, 2, 8, 8," NSCalendarUnitDay ") Do ") = NSCalendarUnitDay, NSHourCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_4, 10_10, 2_0, 8_0," NSCalendarUnitHour instead ") = NSCalendarUnitHour, NSMinuteCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_4, 10_10, 2_0, 8_0," Use Instead NSCalendarUnitMinute ") = NSCalendarUnitMinute, NSSecondCalendarUnit NS_CALEN DAR_ENUM_DEPRECATED (L0_4, L0_l0, 2_0, 8_0, "using NSCalendarUnitSecond instead") = NSCalendarUnitSecond, NSWeekCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (L0_4, L0_l0, 2_0, 8_0, "use depends on NSCalendarUnitWeekOfMonth or NSCalendarUnitWeekOfYear, which mean") = kCFCalendarUnitWeek, NSWeekdayCalendarUnit NS_CALENDAR_ENUM_DEPRECATED ( 10_4, 10_10, 2_0, 8_0, "Usage NSCalendarUnitWeekday instead") = NSCalendarUnitWeekday, NSWeekdayOrdinalCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_4, 10_10, 2_0, 8_0, "U Yoga NSCalendarUnitWeekdayOrdinal instead ") = NSCalendarUnitWeekdayOrdinal, NSQuarterCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_6, 10_10, 4_0, 8_0," using NSCalendarUnitQuarter instead ") = NSCalendarUnitQuarter, NSWeekOfMonthCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_7, 10_10, 5_0, 8_0," NSCalendarUnitWeekOfMonth instead use ") = NSCalendarUnitWeekOfMonth, NSWeekOfYearCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_7, 10_10, 5_0, 8_0, "NSCalendarUnitWeekOfYear instead use") = NSCalendarUnitWeekOfYear, NSYearForWeekOfYearCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_7, 10_10, 5_0, 8_0, "NSCalendarUnitYearForWeekOfYear instead use") = NSCalendarUnitYearForWeekOfYear, NSCalendarCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_7, 10_10, 4_0, 8_0, "instead of using NSCalendarUnitCalendar") = NSCalendarUnitCalendar, NSTimeZoneCalendarUnit NS_CALENDAR_ENUM_DEPRECATED (10_7, 10_1 0, 4_0, 8_0, "Use NSCLUnitTimeZone instead") = NSCALendarUnitTimeZone;};  

osx - change keyboard language Input sources programmatically in SANDBOX (TISSelectInputSource) -


I am trying to change the keyboard layout programmatically. I've got a solution here, but it's not working in a sandboxed application. I have found out that I have to set an exception in the entitlement file, and more precisely com.apple.security.temporary-exception.mach-lookup.global-name

   & Lt; Key & gt; Com.apple.security.temporary-exception.mach-lookup.globalname & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; Com.apple.tsm.portname & lt; / String & gt; & Lt; / Array & gt; & Lt; / Dict & gt; & Lt; / Plist & gt;  

When I run an application, I still get an error 16.03.15 17: 47: 48,000 kernel [0]: sandbox: my_app (3704) mac-lookup. Apple denies the console .tsm.portname in the console Here's the documentation to change the keyboard layout, but there is nothing about sandbox. any idea?


mongodb - Querying sub documents in mongoose -


मॉन्गोस में मॉडल का पालन करें:

  var specie = mongoose.Schema ({आदेश: स्ट्रिंग, परिवार: स्ट्रिंग, जीनस: स्ट्रिंग, प्रजातियां: स्ट्रिंग, गुण: [{संपत्ति: स्ट्रिंग, मान: स्ट्रिंग}]});  

मैं एक क्वेरी बनाने की कोशिश कर रहा हूं जो गुण सरणी में विशिष्ट मानों के आधार पर दस्तावेज़ वापस करेगा।

नीचे मेरी क्वेरी का एक उदाहरण है:

  var query = {$ and: [{"properties.property": "पंखों की संख्या", "properties.value ":" 2 "}, {" properties.property ":" एंटीना अंत "," properties.value ":" clubbed "}}  

मैंने सोचा कि यह क्वेरी काम करेगी लेकिन यह वास्तव में सभी दस्तावेज़ों को "पंखों की संख्या" और "ऐन्टेना एंड" और एक मान "4" और मूल्य "क्लबबर्ड" प्रदान करता है।

{property: "पंखों की संख्या", मान: "2"} और

{संपत्ति: "ऐन्टेना एंड", मान: "क्लबबर्ड"}

हालांकि उपरोक्त प्रश्न उन दस्तावेजों को भी देता है जिनके पास संपत्ति है:

  {property : "पैर की संख्या", मूल्य: "2"}  

मैं इसका समाधान कैसे कर सकता हूं?

मेरा मानना ​​है कि मुझे अपना जवाब मिला। मुझे क्वेरी में $ elemMatch का उपयोग करना होगा:

  var query = {$ और: [{properties: {$ elemMatch: {property: "पंखों की संख्या", मान: "2"} }}, {संपत्तियों: {$ elemMatch: {"property": "ऐन्टेना अंत", "मान": "क्लबबर्ड"}}}]}  

संसाधन लिंक जोड़ना:

यह सही परिणाम वापस आ रहा है।


turboc++ - I cannot run turbo c++ as it says can't init sdl -


Error message is: SDL can not use direct input device: set data format invalid parameters I recently used in my system I have tried to remove SDL but can not do this

I had the same problem. I have a Himachal Pradesh in which the Datetable Keyboard Base is running on Windows 8.1 and I wanted to start brushing my old programming skills. I was able to run Turbo C4 at home, but as soon as I get my machine mobile, I could not init "SII error" error when I got home, it worked fine. My home setup includes a USB keyboard and mouse.

After the trial, I was able to confirm that the Turbo C4 DOS based environment can not control the touchpad. When I plugged in my USB mouse, everything started working again. Therefore, get yourself a cheap USB mouse.


python - Find Parent of specific Child -


Text after "

Is this package possible with xml.etree to find a child's parents? For example:

I search for the object "elements" that include the child "continuous specification".

"itemprop =" text ">

You can use the <.> .us elements [constant specification] XPath expression , example:

  as imported ET data xml.etree.ElementTree = "" "& lt;? Xml version =" 1.0 "encoding =" ISO-8859-1 "& gt; root & gt; & lt; element & gt; & lt; constant specification & gt; & lt; / constant specification & gt; & lt; / element & gt; & lt; ; Element & gt; & lt; data-specifications & gt; & lt; / data-specifications & gt; & lt; / element & gt; & lt; / root & gt; "" "root = et.fromstring ) Print Root (Find '.applications [constant-specification]')  

ios - Refresh Current UIViewController from another view - Swift -


My problem is that I want to apply some settings to my running application when I fly-to refresh the table controller To get a lot of tutorials, but this is not the case.

I have a button inside some of the labels and when I press the button that I open in the form of a popover (like inside the current scene) another view controller, my settings page controller from here I can choose a text label and language color to apply in the app. Unfortunately I do not know how to apply this setting immediately.

Any help, with some code, will be awesome!

You should transfer the instance of the parent controller to popor.

  func showPopover () {var settingController = ... var popoverController = ... settingController.parentController = auto // show popover ...}  

In the setting controller, you will have a vibration parent controller

or you can refresh the parental controls made by Overview Will Willappper, didViewAppear.

Edit

(1)

  @protocol MyDelegate {- (zero) Refresh: (UIColor *) color; } @implement ParentController & lt; MyDelegate & gt; {- (IBAction) showPopover {ChildController * childController = ... childController.delegate = self; ... // show popover} - (blank) Fresh label: (UICLOR *) Apply color to the protocol {Update labels}} @ Adjust the hair controller {MyDeliget * representative; - (IBAction) changeColor {Color * Color = ... if (Rep! = Zero) [Rep] Change: Belle: Color]; {} (2)  

(2) @implementary childcontroller {- (IBAction) changeColor {color * color = ... [[SystemManager example] setColor: color ]; // System Manager Example if Static Variable}} @implementationParentController {- (zero) ViewViewPaper: (BOOL) Animated {[Super ViewWlapper: Animated]; // Static Variables Get Colors from UIColor * color = [[SystemManager Example] getColor]; // update labels here}}


php - symfony huge file download -


I have a controller in Symfony2, which provides file downloads.

Gt; Receive ('principle') - & gt; GetManager (); $ Multilateral = $ em-> GetRepository ('AppBundle: polynomial') - & gt; FindById ($ polynomialId); $ Filename = $ polynomial-> GetFileLocation (); $ Response = new response (); $ Reaction-> Header-> Set ('cash-control', 'private'); $ Response- & gt; Header-> Set ('content-type', mime_content_type ($ filename)); $ Response- & gt; Header-> Set ('content-dispute', 'attachment; filename =' '. Basnem ($ filename).' ''; '); $ Response- & gt; Header-> Set ('content-length', filesystem ($ filename)); $ Response & gt; SendHeaders (); $ Response & gt; SetContent (readfile ($ filename)); Return $ $- & gt; Redirect ($ this- & generationalUrl ('users_polynomials')); }

This job is fine for small files (& lt; 100MB). But if I want to download more than 100 MB file I get an error (ERR_INVALID_RESPONSE) I found that this problem is probably in the PHP function readfile () , which causes memory exhaustion.

Is there any way in Symphony 2.6.1 to download large files without memory exhaustion?

Sure you want to use Symfony \ Component \ HttpFoundation \ BinaryFileResponse .

$ response = New BinaryFileResponse ($ filename);

This will also automatically take care of the headers for you (although you can add more headers if needed).


sql - MS Access DataTime field (General Date) insert query -


I have a generic DAL query, which was not able to insert the date. But now I want to edit it but how do I get involved? I tried it as string, convert (), format () .. Anything, still I cant seem to find how to do it. It should be a normal format (which is DD / MM / YYYYHH: MM: SS (24D)) but I am unable to find it correctly. Public static Zero AddRow (string TableName, Object [] value) {DataTable dt = OleDbhelper.fill ("SELECT TOP 1 * FROM" + TableName); If (dt.Columns.Count - 1 == values.Length) {string sql = "INSERT INTO" + + Table Name + "(for (int i = 1; i & lt; dt.Column.Count; i + +) {SQL + = "[" + Dt.Columns [i] .columnName + "]; if (i! = Dt.Column.Count-1) sql + =", "; else sql + =") " ;} For Sql + = "VALUES ("; (int i = 0; i

Any ideas? P> / div>

If this is in use, then use it:

  sql + = values [I] .tostring ("# 'Yyyy /' MM '/' dd hh ':' mm ':' s '#'");  

metadata - WordPress non translatable content on a translatable custom post (via WPML) -


I was recently implementing a custom post type in WordPress, and WPML was added so that I could change its title and translation I can; material.

This post type (city) also has some custom metabox (metabox.io) such as:

  • Coordinate
  • isFeatured
  • < Li> Address
  • etc ...

Now I am confronted that these custom fields are deposited against the post id, and should be added for each Languages ​​(different languages ​​are separate post IDs) It is neither convenient nor practical, given that I now duplicate all the values ​​from these areas in each language If there is a mistake then there may be different coordinates in different languages ​​in the same city.

My question is, what would be the best way to deal with this problem? How can one set of metadata relate to all translations of the same post? In this way, I need to add it once for every city, and if needed, edit it in one place.

Thanks,


html - Line-height do not work on mobile -


I have an icon font and I need to center my letter in a circle. I copy my code / it The CSS code is

  .inon: before {margin: 0 auto; Font-size: 57px; } .con H2 {text-align: center; } .circle.icon: before {border-radius: 50%; Color: #FFFFFF; Width: 65px; Height: 65px; Display area; Text align: center; Line-height: 1.2 meters! Important; }. Cyon.mobile: First {content: 'F'; } .mobileC {color: # 8CC63E; }. Cyon.mobile-background: {background-color: # 8CC63E; }  

This is the html code

   

As you can see through the normal browser, they are centered desktop

But when I open the page via mobile let me see this

Did you

  vertical-align: center;  

?

In most cases, it works

or you can use padding, and you can avoid resizing using it:

  Div {-webkit-box-sizing: border-box; -MOZ Box-Size: border-box; Box-size: border-box; }  

Jquery ajax method success data -


खोज सिस्टम के लिए अजाक्स विधि।

  फ़ंक्शन पोस्टफॉर्म () {$। {Type: "post", url: "assets / server.php", डेटा: $ ("# frm")। Serialize (), सफलता: फ़ंक्शन (डेटा) {console.log (डेटा); var डेटा = डेटा $ ("।"); $ ("। Firstinfo")। Html (डेटा [0]); $ ("। Secondinfo")। Html (डेटा [1]);}}, "जेसन"); }  

मैं इस कोड के टुकड़े के साथ काम कर रहा हूं। लेकिन मैं यह नहीं समझ सकता कि ये तीन रेखाएं वास्तव में क्या कर रही हैं।

  var डेटा = डेटा.split ("||"); $ ( "Firstinfo।") एचटीएमएल (डेटा [0])। । $ ( "। Secondinfo") एचटीएमएल (डेटा [1]);  

क्यों पाइप साइन के साथ विभाजन? मुझे लगता है कि सफलता की पद्धति एक सरणी देता है और यह पहले इंफो में डेटा दिखाती है, दूसरा अंतरांश मैं वास्तव में एक खोज प्रणाली के साथ काम कर रहा हूँ कृपया मुझे बताए गए अंकों के साथ उपरोक्त उल्लिखित कोड मुझे बताएगा?

जब आप संपत्ति / सर्वर को कॉल करते हैं .पीपीपी आप उस पृष्ठ पर एक पोस्ट कर रहे हैं और पोस्ट में एक प्रतिक्रिया है (उस पृष्ठ का कोडो देखें) जो आपके कोड को एनालिसिस करते हैं, ऐसा लगता है कि प्रतिक्रिया, जो इस प्रारूप में विविध डेटा है: [value1] || [Value2] || .. [valuex] फिर आप मूल्यों के इस सरणी के होते हैं और आप उन्हें अपने html में बताते हैं कि कक्षा "firstinfo" वाले सभी तत्व डेटा एरे के डेटा (डेटा [0]) और तत्वों के पहले मूल्य दिखाएंगे वर्ग "सेकंडइनफ़ो" डेटा एरे का दूसरा मान दिखाएगा (डेटा) इसके बारे में अधिक जानकारी:

डेटा प्रकार: सर्वर पर भेजे जाने वाले प्लेनऑब्जेक्ट या स्ट्रिंग या सर डेटा। यह क्वेरी स्ट्रिंग में कनवर्ट किया जाता है, यदि पहले से कोई स्ट्रिंग नहीं है। यह GET- अनुरोधों के लिए यूआरएल में जोड़ा गया है इस स्वचालित प्रसंस्करण को रोकने के लिए processData विकल्प देखें। वस्तु कुंजी / मान जोड़े होना चाहिए। यदि मान एक सरणी है, तो jQuery की पारंपरिक सेटिंग (नीचे वर्णित) के मान के आधार पर एक ही कुंजी के साथ कई मानों को क्रमबद्ध करता है।


lua - In a premake script, how do you get the "kind" of a project? -


I am trying to add a post-build step that runs executable after this project. To do this, the compiler needs to know whether it is .exe or .dll first hand. How can I expand a project during the project phase? I am using Premake 4.3 and Visual Studio 2010. Thanks!

There is no better way in Premake4 that Configuration {"console app or window adapter"} {{thecmd --kind = exe}} {{StaticLib or SharedLib}} Configuration {/} PostBillic Order {"CCMD --kind = Lib"}

You can use tokens in Premake5.

  Postbuilding order {"thecmd --kind =% {iif (Cfg.kind: ends (" app ")," exe "," lib ")}"}  

ios - CorePlot control on pinching -


I was thinking that there is a way to control the scale of the chart, while sticking in that way when you have a horizontal look Pinch gets X-X scale and if you grind the vertical y-axis then become yellow. This is the reason that the XP plot, which can be fixed for many spikes and ups and downs (such as 100% to 0% to 90%) to improve readability.

To control how you control the article for user interaction, a plot location representative Can be used. See for available representative methods.


c# - How to get the path to image stored in content folder .net -


I am using this code to get an image from the contents / IMG folder in Visual Studio:

  image image = image.frame file (@ "~ \ content \ img \ toendra.JPG");  

It gives me an error that the file is not found. However, if I give the full path to the image, then it works:

  image image = image.framefile (@ "c: \ user \ steven \ source \ repo \ groep11DotNet \ P2groep11.Net \ content \ img \ toendra.JPG ");  

What is wrong with my relative path?

System.Drawing.Image.FromFile do not know how to do an asp.net The application has to handle root relative paths. You have to use an intermediate function that can be understood to convert it to a physical file path.

  image image = image. Fromphyx (HTTPTtext. Current.sop .Mappath ("~ / content /img/toendra.JPG"));  

Note that I have changed your backslash to the forward slash (which are the correct symbols for use in the URL) and eliminated the need for string.

If you are going to use this a lot, you can create assistant helper classes. Public static class ImageHelper {Public static image LoadFromAspNetUrl (string URL) {if (HttpContext.Current == null) {New ApplicationException Throw ("Can not use HttpContext. Non-ASP.NET Current in context "); } Return Image.framefile (htmlctx.content.sysmappath (url)); }}

Usage:

  image myImage = ImageHelper.LoadFromAspNetUrl ("~ / content / img / toendra.JPG");  

Grails oauth plugin not setting Authentication header when requesting Token(/oauth/token) -


मैं उपयोग करते समय त्रुटि प्राप्त करता हूं

{"error": "unauthorized", "Error_description": "इस संसाधन को एक्सेस करने के लिए पूर्ण प्रमाणीकरण की आवश्यकता है"}

टोकन अनुरोध करते समय प्रमाणीकरण शीर्षलेख नहीं मिला था

मेरा कॉन्फ़िगरेशन दिखाया गया है // $:

  OAuth {{प्रदाताओं पासपोर्ट {एपीआई = com.company.package.security.passport.api.PassportApi कुंजी = 'MyProject' गुप्त = 'गुप्त' authorizationUrl = "http नीचे {providerURL} / OAuth / अधिकृत करें "tokenEndpointUrl =" http: // $ {providerURL} / OAuth / टोकन "कॉलबैक =" http: // {applicationContextPath} / परियोजना / OAuth / पासपोर्ट / कॉलबैक "successUri = '/ लॉगिन / passportSuccess 'विफलता यूरी =' / लॉगिन / पासपोर्टफ़ाइल्यर्न 'हस्ताक्षर टाइप = org.scribe.model.SignatureType.Header scope =' प्रोफ़ाइल '}} डिबग = सच connectTimeout = 5000 receiveTimeout = 5000}  

मैं भी नीचे

दिखाया गया है एक कस्टम providerapi
  सार्वजनिक वर्ग PassportApi फैली DefaultApi20 उपयोग कर रहा हूँ {निजी स्थिर अंतिम स्ट्रिंग AUTHORIZE_URL_WITH_STATE = "% s? client_id =% s & amp; client_secret =% s & amp; redirect_uri =% s & amp; राज्य =% s & amp; response_type = कोड में & amp; grant_type = authorization_code ", निजी स्थिर अंतिम स्ट्रिंग SCOPED_AUTHORIZE_URL_WITH_STATE = AUTHORIZE_URL_WITH_STATE +" & amp; गुंजाइश =% s "; @Override सार्वजनिक स्ट्रिंग GetAccessTokenEndpoint () {गुण appConfig = धारकों .getConfig ()। ToProperties (); स्ट्रिंग टोकनEndpointUrl = appConfig.getProperty ("oauth.providers.passport.tokenEndpointUrl") + "" अगर (tokenEndpointUrl! = नल) {return tokenEndpointUrl;} ।} @Override सार्वजनिक स्ट्रिंग getAuthorizationUrl (OAuthConfig passportOAuthConfig) {गुण appConfig = Holders.getConfig () toProperties;: और {नई RuntimeException फेंक ( "oauth.providers.passport.tokenEndpointUrl पासपोर्ट API टोकन यूआरएल config संपत्ति की जांच करें कॉन्फ़िगर नहीं")} (); स्ट्रिंग प्राधिकरणयूआरएल = ऐप कॉन्फ़िग.टेटप्रॉपर्टी ("oauth.providers.passport.authorizationUrl"); अगर (प्राधिकरण यूआरएल! = नल) {यदि (पासपोर्टओअट HConfig.has स्कोप ()) {वापसी String.format (SCOPED_AUTHORIZE_URL_WITH_STATE, authorizationUrl, passportOAuthConfig.getApiKey (), पासपोर्टओअथ कन्फिग.गेट एपीआईसिरेक्ट (), OAuthEncoder.encode (passportOAuthConfig.getCallback ()), OAuthEncoder.encode ("Yithe"), passportOAuthConfig। getScope ()); } Else {वापसी String.Format (AUTHORIZE_URL_WITH_STATE, authorizationUrl, passportOAuthConfig.getApiKey (), OAuthEncoder.encode (passportOAuthConfig.getCallback ()), OAuthEncoder.encode ( "Yithe")); }} और {नया रनटाइम एक्सपैशन ("पासपोर्ट एपीआई प्राधिकरण यूआरएल कॉन्फ़िगर नहीं है कृपया कॉन्फिग प्रॉपर्टी चेक करें: oauth.providers.passport.authorizationUrl"); साथ ही, दूसरा / oauth / token अनुरोध बनाने का सही तरीका क्या है क्योंकि अगर मैं सामान्य पोस्टस्टेशन सेटिंग प्राधिकरण हैडर का उपयोग करता हूं: बेसिक  client_id: client_secret  (बेस 64 का उपयोग करके एन्कोडेड), यह काम करता है 


java - Data Structure for easy look up -


I am looking for data structure / algorithm in Java that does the following -

  1. If there is no exact match in existence, then select the nearest (one value for B)
  2. If the middle is fine, choose the higher - for example - my Pass numbers are
  3. >

    I only know the value of A and by applying the above rules, make a straightforward look, Appropriate would / remove.

    Example - 1

    If I get 80 as value, then output is 0

    Example - 2

    If I If value is available as 75, then output 1 [according to rule 2]

    <

    example - 3

    If I get value as 70, then output 1 [rule] 3]

    Any advice?

    Updates based on comments - log (n) lookup is acceptable. I am open to implementing myself but need suggestions on how to achieve it. A range ranges from 0 to 1000 with accurate digits of 1 digit.

In fact there is already a data structure that is actually looking for you, which is .

There are ways in which you allow a 'key' to get 'floor' and 'roof'. After this, a little math will give you the value you really want to return:

  Public Fixed TreeMap & lt; Integer, Integer & gt; TM = new tree mark & ​​lt; & Gt; (); Public static zero principal (string [] args) Exception {throws tm.put (80, 0); Tm.put (76, 1); Tm.put (64, 3); Tm.put (56, 4); TM.Product (48, 10); Println (myGet (80)); // System.out.println (myGet (75)); // 1 System.out.println (myGet (70)); // 1} public static int myGet (int key) {integer value = tm.get (key); If (value == zero) {entry  

Note: I did not bother with the appropriate null when there is no floor / roof, but you get this idea.


email - Make Outlook stop trying to connect to server after import -


I have a client whose godaddy / securuser email account was there, and many office computers are Microsoft Server. There were problems with some email that did not come through Outlook (but you can go to webmail and come to the server) the person who installed his server was no longer, and with the Exchange server settings The experience has not happened, so he asked not to connect Outlook directly to the server but rather to the server directly.

I supported everything as .pst, completely destroyed everything from Outlook, it started fresh, and then imported .pst. But now all these strange stuff are not sending emails, email is being displayed and then disappears, and a consistent thing I see is an attempt to connect with Exchange Server, which is bothering me Is it something to be told in the past to connect to the old server? If so, how can I save organized email (thousands and thousands) emails in dozens of folders without bringing back the exchange settings?

I can confirm you that there is nothing in reference to PST in its old exchange server only The one thing I can think of is that all recipients (including sender) email address format, when exporting email to PST, are still in the X500 format instead of SMTP. So if you export things to PST and you use PST outside this special exchange server, then you can not or will not be able to answer existing conversations.

I suggest that you delete all email profiles in the control panel -> Mail, restart the computer and create a new email profile if you have not already tried


r - 'not a graph obect' error when performing degree() from igraph package -


Since I need a normalized score, I call the degree () function on my sensory matrix I got a text file that I had loaded in the R from read.delim . It was perfectly fine with the sna package.

When I Run

  K3_T2_ACAD  

And then

  K3_T2_ACAD_indeg & lt; - Degree (K3_T2_ACAD, g = 1, nodes = null, gmode = "digraph", diag = false, tmaxdev = FALSE, cmode = "indegree")  

This works!

I tried to isolate the sna because I thought this was a problem. However, when I run the igraph degree () function, then it does not work:

  K3_T2_ACAD_indeg2  

returns

error in degree (K3_T2_ACAD, mode = " These ", loops = FALSE, normalized = TRUE): Not a graph object

The first column and line each have participant codes. Is it possible that igraph can not work with it while sna can?

sna package uses approximation metrics, igraph < / Code> does not. You need to create an igraph object to work See examples.


php - Wordpress - Filter posts by multiple meta keys with same value -


लूप:?

 <कोड> & lt; php $ मेटा [ ] = = ('कुंजी' = & gt; 'myfield1111', 'value' = & gt; 'myvalue', // उसी मान, यह इस क्षेत्र 'तुलना' = & gt; 'LIKE' में मौजूद है); $ मेटा [] = सरणी ( 'कुंजी' = & gt; 'myfield2222', 'मान' = & gt; 'myvalue', // एक ही मूल्य, आईडी नहीं इस में मौजूद है दायर 'की तुलना' = & gt; 'की तरह') ; $ पाश = नए WP_Query (सरणी ( 'post_type' = & gt; 'myposttype', 'posts_per_page' = & gt; 24, 'पृष्ठांकित' = & gt; $ पृष्ठांकित, 'meta_query' = & gt; सरणी ( 'संबंध' = & gt; ' या ', $ मेटा),)); ? & Gt;  

यह रिक्त क्वेरी (कोई पोस्ट नहीं बदली गई) के परिणाम है, भले ही मान myvalue कुंजी myfield1111 से बाहर निकलता है। यह मेरे लिए तर्कसंगत नहीं है, चूंकि मैंने या संबंध का उपयोग मेटा क्वेरी से किया है I

यह क्यों हो रहा है, और मैं इसे कैसे हल कर सकता हूं?

हल!

 <कोड> & lt;? php $ querystr = "$ wpdb- & gt; पदों से $ * wpdb- & gt;। पदों, $ wpdb- & gt; postmeta कहां $ wpdb- & gt; posts.ID = $ wpdb- & gt; postmeta.post_id और ($ wpdb- & gt; postmeta.meta_key = 'myfield1111' और $ wpdb- & gt; postmeta.meta_value की तरह '% myvalue%') या ($ wpdb- & gt; postmeta.meta_key = 'myfield2222' और $ wpdb- & gt; postmeta.meta_value की तरह '% myvalue%') और $ wpdb- & gt; posts.post_status = 'प्रकाशित करें' और $ wpdb- & gt; posts.post_type = 'myposttype' और $ wpdb- & gt ; Post.post_date & lt; अब () आदेश द्वारा $ wpdb- & gt; posts.post_date DESC "; $ Pageposts = $ wpdb- & gt; get_results ($ querystr, ऑब्जेक्ट); ? & Gt;  

grep - Systematic replace part of variable name with 1st element of an associated R vector -


I have dataframe in which the first element of an associated 'name' vector is related to the respective named vectors. I am trying to change the meaningless number with the first element of the respective name vector.

Here is an example dataframe:

  df < - data.frame (data .0.name = c ("A", "A", "A"), data 2.0.one_minute_ago = c (1,2,1), data 2.0.one_hour_ago = c (2,2 , 3), Data.1.name = c ("B", "B", "B"), data .1.one_minute_ago = c (3,3,2), data .1.one_hour_ago = c (5, 6,2)) ` 

Each number.name is associated with the formation of vector (in this case either A or B) and each Number.time is associated with a time dimension. So, data.0.one_minute_ago in fact you have a_mint_go number.

What I would like to do (because I have a large dataset with a lot of changes) to change the position of the number to construct.dimension To change from, and definitely do this for each number. to 0: 9

I have written some grip codes to start with this work, but to no avail (I got stuck with retaining everything after the number Grep ("data [0-9] .name", name (df), perl = TRUE) as.character (df [1, 1]) as Ascharchar (df [1, 4]) as.character (name (df [2]) as.character (name (df [3]) as.character (name (df [5]) as.character ( Name (df [6]) df.1 <- (df [1, grep ("data. [0-9] .name", name (df))] df.1 & lt; - (df [1, grep ("Data. [0-9] .name", name (df))) df.1 & lt; - data.frame (loop (df.1, as.character), stringsfactors = FALSE) & lt; - as.character (df.1 [1, c (1: 2))]

here first and second element of cleverness 0.name / 0.dimension and 1.name / 1.dimension are the structures / code> respectively [2] < / Code>

From there, I'm doing a lot of code to contain some names (df) [/ p>

 ]  

edit Do: Here is the desired variable name output: When changing the variable name (and of course, it is to maintain the value associated with variable names:

  data.A.name data.A.one_minute_ Before data.A.Or_Hor_go data.b.name.data.b. edit 2: In my true dataset, the number of iterations per dimension (i.e., min_ege_go, a_home_go, e_de_go) can vary in the construction (i.e., two dimensions For constructing one one and 3 for the other, and 9 for the other). I would like the solution to take it into consideration.  

Here is a modified sample dataset to reflect this subtlety:

  d F & LT; - data.frame (data.0.name = c ("a", "a", "a"), data 2.0.one_minute_ago = c (1,2,1), da ta.0.one_hour_ago = C (2,2,3), data1.name = c ("b", "b", "b"), data .1.one_minute_ago = c (3,3,2), data1. On_hor_guo = c (5, 6,2), data 2.2.name = c ("c", "c", "c"), data 2. 2. Forest_mint_go = c (3,3,2), data2.a_hour_ago = c (5,6,2), data2.on_de_go = c (3, 2, 3))  

We make a group 'index' based on 'number' in column names. Get an element from the column with the suffix ('r1') as the column name partition 'name' based on 'indx' ('lst'), with 'R1', each element of 'lst' Use 'map' and gsub to change 'number' in

  indx < - gsub ('[0-9] +', '', name (df)) lst & lt; - Division (Name (DF), Indx) r1 & lt; - as.character (unlisted (df [1, grep ('name', names (df))))) lst2 & lt; - Map (function (x, y) gsub ('[0-9] +', y, x), LCT, R1) Name (df)  

ios - iPhone problems with PHP sessions -


This is something that I've done in practice so far I have not seen before.

I have made a web app that works beautifully on all devices (I was still thinking) Last week I got some complaints that a part of the application does not work. Maybe I have reviewed my code 100 times and I am not mistaken and the error behavior is that the session ends at one point or just is not setup - which is not possible, the system was tested on users' heaps .

Today I got a response from the customer using the iPhone 5. And in fact it happens that the session is not working properly.

I to use this session there is no possibility of the user to jump to the pages in order and to jump from page to second page. If the user tries to leave the page, then just need to return to the beginning and restart the process.

During this process, the return and stop on the iPhone does not allow you to go to level 1, unless you empty the cache.

This error occurs irregularly anywhere in the process.

- To mention, the user loses the end again.

Is it possible that the iPhone has a problem in my browser or there is an error on my side?

Thank you!

This is the problem I was facing as soon as possible. This can help with it. There may be session issues for the login page because the URLs you are opening in the browser are not unique. For example, if you are creating a login page for your website, and you have successfully created the session. Now, if you are signing in with the URL, your session is restricted to this URL only. If you open the above mentioned URL again (note www in both the URLs), you will see that you are not logged in. So please make sure that your webpage is always open in a single type of URL. Either www with or without www.


Sonatype Nexus: Cannot proxy http://milton.io/maven/ -


We are using Nexus for proxy remote magnum repositories. It works well except the Mewen repository of Milton.O.

If I add a repository to my Mayvan settings .xml without using the Nexus, then it works well, the artwork is dragged correctly:

 < Code> & lt; Stores & gt; & Lt; ID & gt; Milton-repo & lt; / Id & gt; & Lt; URL & gt; Http: //milton.io/maven/< / URL & gt; & Lt; / Stores & gt;  

Now if I add the repository to the Nexus as a 'proxy repository' then this does not work. Nexus can not pull essential artifacts:

  Failure to find IO.milton: milton-server-ce: jar: http: // xxx: 8180 / Nexus / content / group / in local store Public cached, until the Nexus updates update has not expired or the update has been compelled, it will not be resolved  

Any ideas why the Nexus this repository Can not Proxy?

Edit: If I look in the Nexus log then this is:

  2015-03-17 11: 05: 05,779 + 0100 info [ar-4-thread -4] Administrator org.sonatype .nexus.proxy.maven.routing.internal.RemoteScrapeStrategy - Not possible the remote scrap of M2Repository (id = melton), no scraper succeeded.  

Note: The proxy repository has been correctly added to the public group.

I'm seeing very poor performance from this server, this process can take about a minute to process Is:

So you're killing the default read timeout of the repository 20 seconds in Nexus

Check out the nexus.log file to see if What are the expiration exceptions. If so, increase the timeout in the "HTTP request settings (optional)" and in the configuration of the repository. It takes 60 seconds with 3 reports as if it could work.


c++ - Unroll a loop using a macro that has a goto and a label in it -


This question is strictly related to C or C ++ language abilities. I do not suggest the code below as a design pattern, I do not use it and I do not encourage it. But I'm just curious to improve my information!

I have defined a label that contains a label and a goto condition.

  #define BROP (number, zodiac) \ Num = rand_lcg (generated); \ If (num% 2) \ {\ rng1: \ generate = rand_lcg (generated); \ If (generated & lt; 512) \ sum - = generates; \ Else \ goto rng1; \}  

and later code I use it like this:

 for  (i = 0; i & lt; iterations; i ++ ) {BROP (Num, sum); BROP (number, yoga); BROP (number, yoga); // ...}  

I end up in a situation where the loop gets unearned and the label is redefined .

Is there a smart creation I can use to make the compiler label change every time defined "instantiated"?

I know about all the options to avoid this statement but still, I do not know the answer to the question.

You actually want to do this a do ... while < / Code> loop:

  define #BROP (num, sum) {\ bool again = false; \ Num = rand_lcg (generated); \ If (num% 2) {\ do {again = wrong; \ Generate = rand_lcg (generated); \ If (generated & lt; 512) \ sum - = generates; \ Else \ again = true; \} While (again); } While looking for (0)  

old external do { ... } while (0) move.

If you insist on (wrong) being a label and you are using the compiler (or should be compatible with it), then you can use the extension (i.e. __ label __ ...)

You can also generate labels from the __ line __ number using the preprocessor. Take inspiration from

  # Define STUPID_LOOP_BIS (Test, Lin) Do {\ Laboratory ## Lin: If (Test) Goto Lab ## Lin; } (0) #define STUPID_LOOP_AT (test, lin) STUPID_LOOP_BIS (test, lin) #define STUPID_LOOP (test) STUPID_LOOP_AT (test, __LINE__)  

For unclear reasons All you need is three macro!

and use

  STUPID_LOOP (x ++> <100); STUPID_LOOP (y--> 0);  

On the different lines, of course, friendly and will improve for your needs.

You should definitely use and trust more compiler optimization capabilities and stable inline function for each exam machine branch ( For example, because) does not compile; Each loop machine is not compiled for the loop (for example). You are probably losing your developer time, and more importantly, you are disabling adapt to your move (so your code will be slow, not fast).

If using GCC or Enable Clag Optimization and Warnings: then
GCC -Wall -Wextra -O3 -mtune = native


Where to put a separate business logic class or classes in CakePHP 3? -


I am preparing a new app and I am planning to use KPPHP 3. Usually when a PHP MVC framework KPPHP, codeigner) I have set a different category that represents the business layer or service level (depending on which word you want to use). Thus, stack:

- view

- controllers [actually only a part of the ideas; Code-Back to C # Land]

- Business Layer [where business logic goes, because business logic spreads many domain items and is not suitable for a model / DAO]

< P> - Model [aka data access object]

... moving between layers with domain objects (now "unit" in cake php3).

I think that cake PHP 3 is still no concept of a business layer in the default structure, which is disappointing but hardly difficult. But after that, my question is not really a pedestrian: this is where I keep MyBusinessLayer.php? In Cake PHP 2 I put it in app / lib, and it would have loaded with

  app :: import ('Lib', 'Mibnnessale');   

What is the equivalent in KPPHP 3, and how do I load it? I realized that I could touch any old place and need_once (), but I wonder if there is a way that coin is consistent with PHP standards. This question is easily ten-line utility class, but in my case it is applicable at the professional level.

For your business layer src directory example, you have Can be a folder called src / core or src / MyBusiness or you may have multiple folders such as src / command source / handler , it is up to you to know how to architecture your application, besides accessing data in a web app service or database.

src If the correct namespace is given then it will be loaded automatically. Src / MyBusiness / BusinessRules.php Name Location App \ MyBusiness

  // Class BusinessRules {...}  

Can load from second usage keyword:

  // Use any other file in the app \ MyBusiness \ BusinessRules; ... $ rules = new business rule ();  

KPHP does not make assumptions for you, when they talk about these types of objects, because they are usually very specific for your application. It offers different types of devices that can help you create a better architecture with a faster and less code. For example configurable implementations by using the event system for appet-oriented programming or archive configuration attributes for the library to work with data using a functional approach.


excel - Selecting a sheet from the value in a cell -


Is it possible to select a sheet based on values ​​in the cell, for example

  Col_1 Col_2 Col_3 gor 100 jan mack 60 jan john john 40 mar ---- & gt; This data is being checked on ..... then on the people who have less than 50 hours and if they have 50 hours then I will have to go to that letter. And they must be marked to represent them. Here John is less than 50 hours, I get the name of the journal from here which is the march here. I have to meet that journal and have to mark them. My question is whether it is possible to choose or get the name of a sheet based on value in a cell.   

If your cell value is a date string, you can use it to enter string format You can use Format for. For example, if you have "3/15/15" in your room, you can change it to sheet name "March-15" using the code given below:

  String with a slow date 'This value is your active sheet worksheets (1). Simply 'extit' to set, just set a date cell (1, 1). Value = "3/15/15" 'Date' to get date name from cell and format Date = output output: 

img src = "https: // i .stack.imgur.com / G06OW.png "alt =" Enter image details here ">

Note that you may need to adjust to your date format, as I I am working in US-English format, but to formulate the concept that the value in the cell is what you want.


mongodb - How express-session manages its session storage? -


मान लें कि मेरा node.js + express + सॉकेट.ओ सर्वर एक्सप्रेस-सत्र मध्यवर्ल्ड के साथ mongoDB का उपयोग कर रहा है 'connect-mongo' ) के साथ सत्र का maxAge नल पर सेट होता है (अर्थात कुकी का उपयोग उपयोगकर्ता के ब्राउज़र के रूप में तब तक चलता रहता है), और अब यह सर्वर पूरी तरह से नीचे है।

युग एक नई सदी से गुजर रहा है, जबकि धरती लाश , वेयरवोल्फ्स और विदेशी आक्रमणकारियों , बेहद बहादुर वैज्ञानिकों का एक गुच्छा अपने सर्वर के अखंड अवशेषों को खोजते हैं और उन्हें बूट करते हैं।

इसलिए, इस समय तक कई (यदि हर नहीं) क्लाइंट के ब्राउज़र्स बंद हो गए और कुकीज साफ़ हो गई । यदि उन ग्राहकों में से एक मेरे सर्वर से कनेक्ट होगा, तो सर्वर पता लगाएगा कि वह (ग्राहक) किसी भी वैध कुकी को प्रस्तुत नहीं करेगा और उसके लिए एक नया होगा।

अब - जिस भाग में मुझे दिलचस्पी है - उन पुरानी सत्रों में संग्रहीत कनेक्ट-मांगो भंडारण के साथ क्या होता है। जाहिर है, सर्वर डाउन होने के दौरान उन्हें साफ करने में सक्षम नहीं था, और अब वे सिर्फ डीबी स्टोरेज में मृत कार्गो के रूप में लटकाएंगे? या उसके पीछे कुछ दिमाग वाला जादू है, जो कि सर्वर रिबूट के बाद, किसी तरह 'पता' होगा कि वे उपयोगकर्ता अपने सत्र समाप्त हो चुके हैं, जबकि सर्वर नीचे था और तदनुसार सब कुछ साफ कर देगा?

एक्सप्रेस-सत्र इसके स्टोर के लिए किसी भी क्लीन अप व्यवहार को लागू नहीं करता है (कम से कम मुझे कोई भी दिखाई नहीं देता उसमें का सबूत) हालांकि, स्टोर निश्चित तौर पर पुराने सत्र को साफ कर सकते हैं उदाहरण के लिए:

डिफ़ॉल्ट रूप से, कनेक्ट-मोंगो मोंगोडीबी की टीटीएल संग्रह सुविधा (2.2+) का इस्तेमाल करता है ताकि स्वचालित रूप से समय समाप्त हो चुके सत्रों को हटाया जा सके। लेकिन आप इस व्यवहार को बदल सकते हैं।


drupal - Creating view with node reference -


I am using drupal 6. Please consider me with the suggestions given below,

  1. will be a list of prizes (gold, silver etc.)
  2. List of companies on whom An award (comp 1-> gold, comp 2-> gold,

  3. I need to display a list of rewards for the first time and if the user clicks on any award, Repeat on the page of the award winning companies

I created two content types for prizes and companies and the prize_id is used as a node reference in the company content type. I am using Dopple 6. Thanks.

The first task (just a simple list of awards It's easy - just create a scene that nodes display in the "Reward" type Of that, in order as much as you want, as you want as limitations ... node ID is entered, if not available at the beginning, because you need it.

For another task - Create a new view, which will be given under the companies and the Arguments, add that reward ID. Then, you should give the reward id to the page as an additional parameter:

/ awords / 3

where there is 3 awards ID.

Sorry, Drupal 6 is very old and I have not used it recently, but this is the basic idea.


html - Half of page not displaying on mobile devices -


I have a page in which the contents of the website on the right are hidden.

Please guide me why this is happening and how to solve it Thank you.

  & lt; Div id = "responsivearea" style = "margin-top: -23px; padding-top: 90px;" & Gt; & Lt; Div class = "img-center" & gt; & Lt; Img class = "wp-image-2520 alignleft" style = "margin-right: 180px;" Src = "http://www.inspuratesystems.com/nayajeevan/wp-content/uploads/2015/02/Meet-rabia.png" alt = "good employer" width = "190" height = "100" /> ; & Lt; A href = "http://assasociety.org/video/asher-hasan-spark-extinguished" target = "_ blank" & gt; & Lt; Img id = "ashersStory" class = "wp-image-2521 alignleft" style = "margin-right: 80px;" Src = "http://www.inspuratesystems.com/nayajeevan/wp-content/uploads/2015/02/Ashers-story-circle.png" alt = "gift of health" width = "190" height = "188" /> & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; P style = "float: left; margin-left: 48px; font-size: 25px;" & Gt; Meitei RBIA & lt; / P & gt; & Lt; P style = "float: right; margin-top: -79px; margin-right: 100px; font-size: 25px;" & Gt; The story of Asher & lt; / P & gt; & Lt; Div & gt; & Lt; P style = "float: left; margin-left: 26px; font-size: 15px; width: 200px;" & Gt; Everything is hand-coded and every small detail has been noticed, we will go to the extra mile to make your product right. & Lt; One style = "color: # fd 685b;" Href = "#" & gt; & Lt; Strong & gt; Learn more & lt; / Strong> & Lt; / A & gt; & Lt; / P & gt; & Lt; P style = "float: right; margin-top: -183px; margin-right: 107px; font-size: 15px; width: 180px;" & Gt; Asher was born and raised in England until the age of eleven. At that time, the untimely death of his father & lt; One style = "color: # fd 685b;" Http://www.inspuratesystems.com/nayajeevan/?p=3202 "& gt; & lt; strong & gt; Learn more & lt; / strong & gt; & lt; / a & gt; & lt; / p   There is a strict value of width for / code>. 

Try using max-width for example.

In addition to row 242 (600px width)


javascript - Google search dynamically, when we click on a link -


We need to implement a link that will present with some information and when we Click on the link, Google should open with search results for information .

I tried with {info}. I know this is not the right way. Please suggest your thoughts ..

"Drive your passion with your passion" - Praveen V.


Tango in a dark setting -


For the ATAP team:

My Yellowstone device has an IR filter on the fish-eye Camera lens . I have watched Tango in a deep room by filling the water with the IR light. Color exposes camera room (as grayscale), and fishes does not show anything (just a black image). Tango service does not work in this setting.

How important is the eyes of fish for the visual odomi? I am thinking that the fish will be able to give the correct position / orientation reading to the Tango service by removing the IR filter from the eye lens. But this is my expensive operation to Tango, so I wanted to ask the question before doing it.

FII, Tango service in this setting gives status messages such as "FishIndex underpaced" and perhaps the Tango service has stopped trying to make Visual Odomi in this situation (even if the RGB-IR camera room Can see as grayscale). So to take out the Tango service, I had a small pencil and amp; Raised in this fish-eye camera. It has got rid of the underexposure situation, but this is the correct orientation & amp; Event. Tango was still quite lost. As much as I can tell, no visual odometry is done with the RGB-IR camera (i.e. Fishey does all this) ... or the camera frames burned by the IR are not acceptable for odomime (probably color natural Is necessary for the facility recognition ???).

How can Tango team IR light alone provide information about how a visual odometer can be done in a dark room? Or is it even possible?


authentication - Add CSS in a confide laravel web page -


I have some code where trust is () used. Now I would like to add CSS to these web pages of Larwell.

Can someone say how can I do this?

Unless I am wrong I'm pretty sure that the poster is trying to ask that method That remain outside the app \ view folder. The forms used by default are in the \ vendor \ zizaco \ confide \ src \ views folder.

You can change the default forms and edit custom config.php and use custom ones from style them like any other footage.

Change it

  * vendor \ zizaco \ confide \ src \ config \ config.php 'login_form' => 'Confide :: login', 'signup_form' = & gt; 'Confide :: signup', 'forgot_password_form' = & gt; 'Confide :: forgot_password', 'reset_password_form' = & gt; 'Confide :: reset_password',  

for this

  * vendor \ zizaco \ confide \ src \ config \ config.php 'login_form' = & gt; ; 'User.login', 'signup_form' = & gt; 'User.register', 'forgot_password_form' = & gt; 'User.password', 'reset_password_form' = & gt; 'User.reset',  

javascript - AngularJS Data Binding Breaks ngRepeat + Strange Behavior -


Background : I'm a system system that's closed for front end development. Just moving around with the glass became creative with the data binding and now I am trying to understand this behavior:

  & lt; Div ng-app & gt; & Lt; Div class = "container" & gt; Name & lt; Input type = "text" ng-model = "user.name" & gt; & Lt; / Div & gt; {{User.name}} 

I hope that it takes input from my box, mirror the text between the input box, and repeat each letter on its line below.

If I type "test" in any one input, then ng-repeat will break when a sheet repeats

typing alphabet works sequentially like I I hope.

Why is ng-repeat braking when duplicate input characters? I have no practical use for this, I was experimenting with Kangaroo only for fun and came upon it and did not understand it.

NG-Enhanced duplicate entries will not accept. As a duplicate entry in test , this will fail

Add track to avoid this .

When we do not enter any by expression (in each letter case), it is considered as a unique identifier so that the entry in the list Can be linked to track changes

& lt; Li ng-repeat = "l in user.name" $ ​​index "& gt; {{l}}


java - Read last character of a text file -


I have found this small code snippet that works just fine:

  Lt; String & gt; Line = files.readlines (path. (F.A.A.A.A.O.O.O.O.L.L.L.), Charset.default charset ()); If (lines.size ()> gt;) {char c = lines.get (lines.size () - 1) .charAt (lines.get (lines.size () - 1) .length () - 1); }  

but it uses the java.nio package which is not previously Java 1.7 available.

Now I need a reliable way of accomplishing with the former Java versions, do you have any ideas? The only thing I can think of is to read the file line from the line with the BufferedReader and if the reading is done in any way, it will restore the last character.

(still using Java6 in 2015? Ah)

Here's a solution; Note that it is understood that you already have a BufferedReader open on file:

  string line, finalline = faucet; While ((line = reader. Readline ())! = Null; last line = line; // Get the last character from the last line, as you already do  

Note that this will actually return the last (Java) char , which will be the last Can not be the code point .


email - php mail spam problems -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 4 जवाब
  $ to = $ _POST [ 'ईमेल']; $ विषय = 'आपका पासवर्ड'; $ संदेश = $ _POST ['पासवर्ड']; $ हेडर = 'से: https://client.yourtradechoice.com/no_reply@yourtradechoice.com' "\ R \ n"; $ हेडर। = 'जवाब दें:'। $ से "\ R \ n"; $ हेडर। = 'एक्स-मेलर: PHP /'। phpversion (); $ हेडर। = "माइम-वर्शन: 1.0 \ r \ n"; $ हेडर। = "सामग्री-प्रकार: टेक्स्ट / html; वर्णसेट = आईएसओ -8859-1 \ r \ n"; मेल ($ से $ $ विषय, $ संदेश, $ हेडर्स);  

मेल स्पैम में भेज रहा है इसे ठीक कैसे करें?

ईमेल भेजने के लिए php मेल फ़ंक्शन का उपयोग न करें PHP मेलर स्क्रिप्ट का उपयोग करें जैसे स्विफ्ट मेलर & amp; ईमेल भेजने के लिए SMTP सर्वर का उपयोग करें।


F#: Difference between Dictionary, Hashtable and Map -


I'm new to .NET programming. Sorry if this question has been asked earlier.

I am currently learning F #. What is the difference between dictionary, hashtable and map? When should I use each?

I have another question that is not mentioned in the title. When should i use async.RunSynchronously? It seems self-contradictory to me, so I'm sure I'm missing something.

The choice between the dictionary, depends on cases of hashtable and map usage. Although you should know the characteristics of each, it is not a complete list, but some important differences you want to start with:

  • hashtable those key / value pairs Is a collection of which is the hash code of the key. It is an unqualified collection from NAT BCL.
  • Dictionary This is a general implementation of the hashteble, apart from NAT BCL An inappropriate collection
  • Education The F # is immutable types. It is implemented on the basis of AVL trees which have completely separate data structure with different performance characteristics and use cases.

If you write several, then display a better filling rate better in the hash table collection AVL tree.

Using a key is very fast to get one value from a dictionary, is close to O (1) , because the dictionary class is implemented as a hash table goes. / P>

The F # map is implemented as a temporary AVL tree, an efficient data structure that makes itself a binary tree of balance. AVL trees are famous for their efficiency, in which they can search, insert and remove elements in the tree at the time of O (log n) , where n is the number of elements in the tree.

As you use the case for the map, if you have found a set of static data (such as the configuration data that loads when your application starts) you will often see the key It is necessary, as a map, good choice in any form, its inconsistency in this case ensures that static data can not be accidentally modified and its performance is small Impact because you never need it to get started.

Async.RunSynchronously runs asynchronous calculation provided and its result is waiting. You can use it in the F # interactive window, for example test your asynchronous workflow.


shell - Data transfer between two remote servers linux (sftp) -


I work far away from my Linux system. I have data on server A, which can only be accessed via SFTP is. The second server is the HPC cluster. I want to get data from server ap in my HPN cluster work directory. So how do we do this? Is there a possible batch job script?

It is usable to use SSH - you can run the script on either server A To run a script on another server to keep on the server or to take files from the server. There is no standard command to transfer files from the server to another remote location in SFTP.


linux - Is there a way to find how many spaces before the first item in awk? -


Here is the input_file:

  DEFHIZ  

What do I need to know is that the number of white space before the first item such as a (hypothetical) variable WHITE_SPACES

  awk '{print WHITE_SPACES $ 1}' input_file < / Code> 

will come back

  4D 8H  

Any good moves?

Try:

  awk '{print index ($ 0) , $ 1) - 1 $ 1} 'input_file'  

Python selenium screen capture not getting whole page -



Python selenium screen capture not getting whole page -

i trying create generic webcrawler go site , take screenshot. using python, selnium, , phantomjs. problem screenshot not capturing images on page. example, if go tube, doesn't capture images below main page image. (i don't have high plenty rep post screen shot) think may have dynamic content, have tried wait functions such implicitly wait , on set_page_load_timeout methods. because generic crawler can't wait specific event (i want crawl hundreds of sites).

is possible create generic webcrawler can screen capture trying do? code using is:

phantom = webdriver.phantomjs() phantom.set_page_load_timeout(30) phantom.get(response.url) img = phantom.get_screenshot_as_png() #64-bit encoded string phantom.quit

here image

your suggestion solved problem. used next code (stolen in part reply question):

driver = webdriver.phantomjs() driver.maximize_window() driver.get('http://youtube.com') scheight = .1 while scheight < 9.9: driver.execute_script("window.scrollto(0, document.body.scrollheight/%s);" % scheight) scheight += .01 driver.save_screenshot('screenshot.png')

python selenium scrapy phantomjs

rendering - WPF determine optimal UI update rate -



rendering - WPF determine optimal UI update rate -

is there way in wpf determine optimal ui update rate, that

no frames skipped and ui stays responsible.

it not create sense to lot work notify ui values have changed when render process not able maintain pace. indeed, notice when seek update often, ui gets unresponsive , little fraction of frames displayed (e.g. invalidatevisual() called 10 times, 1 new frame displayed). instead, prefer ui updated @ native rendering rate.

up now, tried dispatchertimer, if cut down priority background, update method called more rendering occurs (frames skipped) if update rate high. rate depends on hardware , number of elements on screen. if farther cut down priority, timer not called @ (perhaps there background thread running update values).

alex

i wrote quick test see frame rate i'm getting in test .net wpf app.

i'm seeing rate of between 60-63 frames per second, monitor refresh rate 60 hz, guess i'm seeing ui updating @ native rate.

i wrote using compositiontarget.rendering event , implemented behavior , attached textblock in simple mvvm style app:

xaml:

<textblock> <i:interaction.behaviors> <views:frameratebehavior /> </i:interaction.behaviors> </textblock>

c# code:

public sealed class frameratebehavior : behavior<textblock> { private readonly queue<long> _ticks = new queue<long>(); public frameratebehavior() { _ticks = new queue<long>(); } protected override void onattached() { base.onattached(); compositiontarget.rendering += calculateframerate; } protected override void ondetaching() { base.ondetaching(); compositiontarget.rendering -= calculateframerate; _ticks.clear(); } private void calculateframerate(object sender, eventargs e) { var = datetime.now; var endtime = now.ticks; var starttime = now.addseconds(-1).ticks; while (_ticks.any()) { if (_ticks.peek() < starttime) { _ticks.dequeue(); continue; } break; } _ticks.enqueue(endtime); var count = _ticks.count; associatedobject.text = "fps: " + count; } }

wpf rendering frame-rate

model view controller - Publishing websites on azure -



model view controller - Publishing websites on azure -

i published website on azure, plain html page. uploaded mvc 5 project. how images , script published?is there way published website can linked ?

the error style bundles. must have forgotten link scripts or stylesheets. bundles.config , find if right file has been linked.

azure model-view-controller

Laravel form data redirect to error when try to save on DB -



Laravel form data redirect to error when try to save on DB -

i have created registration form using laravel, form working well, validations working without validation error, when seek save data, redirects "whoops, looks went wrong." can please help me find error. give thanks you.

form:

{{ form::open(array('url'=>"create-account")) }} <p> {{ form::text('user_name', '', array('placeholder'=>"user name")) }} @if($errors->has('user_name')) <label> {{ $errors->first('user_name') }} </label> @endif </p> <p> {{ form::text('user_email', '', array('placeholder'=>"user email")) }} @if($errors->has('user_email')) {{ $errors->first('user_email') }} @endif </p> <p> {{ form::password('user_password', array('placeholder'=>"user password")) }} @if($errors->has('user_password')) {{ $errors->first('user_password') }} @endif </p> <p>{{ form::submit('register') }}</p> {{ form::close() }}

and controller has code:

class staffcontroller extends basecontroller { public function getaccount() { homecoming view::make('staff.account'); } public function postaccount() { $input = input::all(); $rules = array( 'user_name' => 'required|min:3|max:20|unique:users', 'user_email' => 'required|email|max:50|unique:users', 'user_password' => 'required|min:5' ); $validate = validator::make($input, $rules); if ($validate->fails()) { homecoming redirect::to('create-account') ->witherrors($validate); } else { $user = new user(); $user->user_name = $input['user_name']; $user->user_email = $input['user_email']; $user->user_password = hash::make($input['user_password']); $user->save(); homecoming redirect::to('login') ->with('global', 'your business relationship has been created, please login'); } } }

model:

use illuminate\auth\usertrait; utilize illuminate\auth\userinterface; utilize illuminate\auth\reminders\remindabletrait; utilize illuminate\auth\reminders\remindableinterface; class user extends eloquent implements userinterface, remindableinterface { utilize usertrait, remindabletrait; /** * database table used model. * * @var string */ protected $table = 'users'; /** * attributes excluded model's json form. * * @var array */ //protected $hidden = array('password', 'remember_token'); protected $hidden = array('user_password'); }

db table has fields:

table name: users fields: user_id int(11) user_name varchar(20) user_email varchar(50) user_password varchar(60) status

routes:

route::get('/','homecontroller@getindex'); route::get('login','homecontroller@getindex'); route::post('login','homecontroller@postlogin'); route::get('create-account', 'staffcontroller@getaccount'); route::post('create-account', 'staffcontroller@postaccount');

laravel laravel-4

How to increase time window for Jenkins TimeLine graph -



How to increase time window for Jenkins TimeLine graph -

in jenkins main page, have link called "build history" builds timeline chart chronology of builds. link is:

http://myhost:8080/jenkins/view/all/builds

it looks following: utilize lot can see in 1 chart how many failures occurred. problem history starts @ 2am, can guarantee have job execution every day @ 1am, , can not see here. in end have to the lowest degree lastly 24 hours each time, did not find configuration menu this. don't know if it's plugin installed or native in jenkins. know how increment time window ? (or give me indication on search ...)

you talking greyish window, not table below, right?

this 2 part slider viewfinder @ top middle.

the lower (darker gray shade) part in hours. fits 4.5 hours in view. upper (middle gray shade) part in days. fits 4.5 days in view. top middle (lightest gray shade) part showing on upper (days) graph relative position of 4.5-hour window viewing on lower (hours) graph.

you can scroll graphs either clicking , dragging left/right, or pointing mouse there , using mouse scroll. since lower graph relative upper graph, scrolling linked too: can scroll in big chunks using upper graph, , scroll in smaller finer increments using lower graph.

if having issues seeing on lower graph, little vertical bars on upper graph (scroll if need to). position within lightest gray area in middle (let's phone call "viewfinder"), , see list of jobs in lower part.

while haven't seen way increment default window default 4.5-hour view, can scroll left/right view past 24 hours.

jenkins

php - I ensure database that has image and the database connect is correct ,but I cannot display the image -



php - I ensure database that has image and the database connect is correct ,but I cannot display the image -

my display code :

<?php include "file_constants.php"; // know broken error_reporting(e_all); // basic sanity checks if(isset($_get['id']) && is_numeric($_get['id'])) { //connect db $link = mysql_connect("$host", "$user", "$pass") or die("could not connect: " . mysql_error()); // select our database mysql_select_db("$db") or die(mysql_error()); // image db $sql = "select image test_image id=" .$_get['id'] . ";"; // result of query $result = mysql_query("$sql") or die("invalid query: " . mysql_error()); // set header image header("content-type: image/jpeg"); echo mysql_result($result, 0); // close db link mysql_close($link); } else { echo 'please utilize real id number'; } ?>

i ensure database has image , database connect correct. can upload image php phpmyadmin (mysql). however, cannot display image.(http:// /file_display.php?id=1) can help me display image in php?? give thanks much!

the file-insert code:

<html> <head><title>file insert</title></head> <body> <h3>please take file , click submit</h3> <form enctype="multipart/form-data" action= "<?php echo $_server['php_self']; ?>" method="post"> <input type="hidden" name="max_file_size" value="10000000" /> <input name="userfile" type="file" /> <input type="submit" value="submit" /> </form> <?php // check if file submitted if(!isset($_files['userfile'])) { echo '<p>please select file</p>'; } else { seek { $msg= upload(); //this upload image echo $msg; //message showing success or failure. } catch(exception $e) { echo $e->getmessage(); echo 'sorry, not upload file'; } } // upload function function upload() { include "file_constants.php"; $maxsize = 10000000; //set approx 10 mb //check associated error code if($_files['userfile']['error']==upload_err_ok) { //check whether file uploaded http post if(is_uploaded_file($_files['userfile']['tmp_name'])) { //checks size of uploaded image on server side if( $_files['userfile']['size'] < $maxsize) { //checks whether uploaded file of image type //if(strpos(mime_content_type($_files['userfile']['tmp_name']),"image")===0) { $finfo = finfo_open(fileinfo_mime_type); if(strpos(finfo_file($finfo, $_files['userfile']['tmp_name']),"image")===0) { // prepare image insertion $imgdata =addslashes (file_get_contents($_files['userfile']['tmp_name'])); // set image in db... // database connection mysql_connect($host, $user, $pass) or die (mysql_error()); // select db mysql_select_db ($db) or die ("unable select db".mysql_error()); // our sql query $sql = "insert test_image (image, name) values ('{$imgdata}', '{$_files['userfile']['name']}');"; // insert image mysql_query($sql) or die("error in query: " . mysql_error()); $msg='<p>image saved in database id ='. mysql_insert_id().' </p>'; } else $msg="<p>uploaded file not image.</p>"; } else { // if file not less maximum allowed, print error $msg='<div>file exceeds maximum file limit</div> <div>maximum file limit '.$maxsize.' bytes</div> <div>file '.$_files['userfile']['name'].' '.$_files['userfile']['size']. ' bytes</div><hr />'; } } else $msg="file not uploaded successfully."; } else { $msg= file_upload_error_message($_files['userfile']['error']); } homecoming $msg; } // function homecoming error message based on error code function file_upload_error_message($error_code) { switch ($error_code) { case upload_err_ini_size: homecoming 'the uploaded file exceeds upload_max_filesize directive in php.ini'; case upload_err_form_size: homecoming 'the uploaded file exceeds max_file_size directive specified in html form'; case upload_err_partial: homecoming 'the uploaded file partially uploaded'; case upload_err_no_file: homecoming 'no file uploaded'; case upload_err_no_tmp_dir: homecoming 'missing temporary folder'; case upload_err_cant_write: homecoming 'failed write file disk'; case upload_err_extension: homecoming 'file upload stopped extension'; default: homecoming 'unknown upload error'; } } ?> </body> </html>

the sql is:

create table test_image ( id int(10) not null auto_increment primary key, name varchar(25) not null default '', image blob not null );

the tutorial http://vikasmahajan.wordpress.com/2010/07/07/inserting-and-displaying-images-in-mysql-using-php/

if saved image name in database , display image in html

<?php $result = mysql_query("$sql") or die("invalid query: " . mysql_error()); while($row = mysqli_fetch_array($result)) { echo '<img src="www.yourdomain.com/your/directory/"'. $row["image "].'/>'; } ?>

note : dont need utilize while loop if having 1 row

php mysql image