Posts

Showing posts from January, 2013

c++ - How can I compile Gnu C in windows -

Many people know how this can be a stupid question, but I'm asking it in any way because Give me some hints The library that I am trying to compile is a screw toolkit for speech processing signal that is written (for a lack of a better description) Gnu C ++ This is a library for which Unix is ​​written and I want to compile it in windows. In the form of any object, in the form of any object, At that end I have installed the code :: block and a minu compiler. I have read that I can also use cgywn and it will start a layer which will explain gnu c before executing it originally, but let me leave that side for this moment. The first issue I visited was that # needs a little love - well, there is no problem in it. But now I feel that scopy.c. 462 | Error: 'SIZEOF_SHORT' unannounced (first use in this function). I have also installed Visual Studio C ++ and have also received it. I assemble it on SIZEOF_CHAR, SIZEOF_SHORT, SIZEOF_LONG, SIZEOF_FLOAT and SIZEO...

Changing name in Header in Openerp? -

Image
I want to rename the header as a client in openerp. I'm using Python and XML See my screenshot. Yes, you need to edit XML for action to help activate developer mode & gt; OpenERP & gt; Click on active developer mode. This will show you the developer's information. Then click Edit Action, and what action name do you want.

java - Apache VFS SFTP moveTo command fails -

I am using Apache vfs sftp to copy a file into a remote Linux box and then rename it. The copy works fine, but when I try to rename the file, it fails I am using vfs 2.0 and jsch 0.1.50 source (remote filetep) /tmp/abc.txt Destination (RemoteFileDist): /home/myName/work/abc.txt The command I used is below: remoteFileTmp.moveTo (remote file delete); The exception I get is below: Exception in thread "main" java.lang RuntimeException : Org.apache.commons.vfs2.FileSystemException: To: "//hostname/tmp/abc.txt SFTP" "Could not rename" SFTP: //hostname/home/myName/work/abc.txt ". Due on com.transfer.SFTPTransfer.uploadRename com.transfer.MainClass.main (SFTPTransfer.java:85) (MainClass.java:23): org.apache.commons.vfs2.FileSystemException: The name could not be changed "SFTP : / /hostname/tmp/abc.txt "from" sftp: //hostname/tmp/abc.txt "to" sftp: //hostname/home/myName/work/abc.txt " Failure to com: 4: On org.a...

asp.net - jQuery UI MultiSelect Widget:-after submitting button(after postback) only last selected element is checked -

I am implementing this JQuery UI multiselect I managed to use it in my ASP .Net page, but when I am submitting a button, the selected text only examines the final element. So how do all checked items be retained after post back . Can anyone help me? Here I am making the data popular in the dropdown list and the main functionality is written to DAL on the data from the database. Protected Zero clearNPouplateListBox (dropdown list ctrl, DataTable DT) {try {ctrl.DataSource = dt; Ctrl.DataTextField = "name"; Ctrl.DataValueField = "Id"; Ctrl.DataBind (); } Hold (Exceptional) {Logger Type ("Exceptions in LogGeneralIncidentForm.ClearNPouplateListBox Method" pre-message); }} Here I am trying to put the selected data in the data table DataTable dtAssigners = new DataTable (); DtAssigners.Columns.Add ("GIMID", typef (int)); DtAssigners.Columns.Add ("UserId", typef (int)); DtAssigners.Columns.Add ("MODE", Typef (four));...

Upload Image From Android to Php Server without External Library -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर अपलोड करने के लिए कोई तरीका है किसी बाहरी पुस्तकालय का उपयोग किए बिना एंड्रॉइड से पीएचपी सर्वर की छवियां? यदि उपलब्ध है तो मुझे उदाहरण दें। पहले अपनी छवि को एक आधार 64 बाइट सरणी एन्कोडेड स्ट्रिंग में कनवर्ट करें। उसके बाद इसे php को भेजें सर्वर साइड पर निकालें। फिर MySQL में उस स्ट्रिंग को संग्रहीत करें उसके बाद उस स्ट्रिंग को एंड्रॉइड क्लाइंट भेजते हैं। छवि स्ट्रिंग निकालें और बेस 64 डीकोड के साथ डीकोड करें। इसके बाद आपको बाइट सरणी मिलेगी, आप बस अपनी छवि दृश्य में दिखा सकते हैं। आपके संदर्भ के लिए मैं कुछ कोड दिखाऊंगा स्ट्रिंग इमेजेटाटा = बेस64.एक्सोडटॉस्ट्रिंग (थंबनेलअरे, बेस 64. डिफाल्ट); mJobject.put ( "imagebyte", imagedata); mJArray.put (mJobject); JSONArray json = नया JSONArray (प्रतिक्रिया); JSONObject जो = नल; ImageArray = नया स्ट्रिंग [json.length ()]; imageArray [i] = jo.getString ( "imageid"); पूरा इमेज = बेस 64.decode (छवि एरे [0], बेस 64. डिफाल्ट); बिटमैप बिटमैप = बिटमैपफ़ैरेंटरडिस्कोडबिट...

string - Check presence of Vowels in word, python -

I have to check whether a vowel is present in one word or not. If so, then an operation should be taken out of the word (open word). I want to avoid the loop because I thought about it: In four words: if char 'aeiou': #confused here ... Please recommend a method that comes to execution time, then the cost is low. Apart from this, help me improve the above approach too. vowel = {"a", "e if any "I", "A", "E", "I", "O", "U"}: ... Note: This is better because it is a short circuit, as soon as the word is received in the word, therefore, all characters do not have to check in unless there is no tone in the string. Edit: went and found, that is very fast, but with some adaptation, again Runt beats everything. Import = "" A "," E "," I "," O "," U "," A "," E " "I", "O", "U"} pa...

fork - put pipe to stdin another process -

I am using pipes to parse another process to array numbers. So far, I am able to get results from another process, although fdopen, I do not understand how to send data as a pipe to another process. Here is my code: int main () {int fd [2], i, val; Pid_t children; Four files [10]; FILE * f; pipe (FD); Children = fork (); If (child == 0) {closed (FD [1]); Dupta 2 (FD [0], STDINIFLNO); Close (FD [0]); Execl ("sort", "sort", NULL); } And {off (FD [0]); Printf ("before \ n"); For (i = 100; i & lt; 110; i ++) {write (FD [1], & amp; i, size (int)); Printf ("% d \ n", i); } Closed (FD [1]); Wait (zero); }} By the way, how can other processes get input? Scanf? I think your pipe is set correctly Problems execl () For this call, you should specify a full path, which is probably / bin / sort if you have a UNIX utility call execlp () There is also a version that automatically searches on the path. The next problem is that...

php - limit the number of a field value in search results -

I run a real state website that allows different users to add their properties. When someone searches for specific criteria, we use a selection statement with the specified conditions to select matching properties, paging bit and displaying results. We use rating algorithms to rate each asset and use it for the preferences of properties displayed. A simplified version: Type Type Bedroom User Score Green House Sales Two Bedroom Alex 6 Blue One Hire Three Bedroom Jack 6 Blue One Sale Three Bedroom Jack 4 Gray One Sale Three Bedroom Jack 6 green fare three bedroom jack 6 purple one fare three bedroom jack 6 green one rent three bedroom jack 6 green one rent three bedroom gary 6 The problem is that sometimes One of the few properties In these cases I do not want a user to possess the property to dominate a search results page in these cases, I want to set a limit to display the maximum of three qualities of any user in a search results page. For example, I do not want Jack ow...

Lotus Notes: error when compose a form -

Image
is an old application, in which we appear to try to write a new form in the lower bar of Lotus Client : "Error logging error in line: N)" - Where N is a positive number. I think that refers to the written library, but is there any way I can see the right "place" where the problem appears? I tried with debug lotuscript but I do not know where the problem is. I appreciate any suggestions or help. Thanks for your time. The action button has the code: @Comand ([compose]; "mainfam"); @Command ([ViewRefreshFields]) Error row may be printed in a lotus script () Search for LotusScript libraries for line error error logging. If you know what is the reason for the error. You can search the designer in the "Search / file" menu

r - how can i filter my dataframe? -

मेरे पास एक डीएफ है जिसमें कई स्तंभ हैं (नीचे देखें) V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 A01 10378809 10379882 Contig1401 | m.3412 101 - 10378809 10379882 255,0,0 1 1073 0 ए 01 10469105 10469293 Contig1755 | m.4465 48 + 10469105 10469293 255,0,0 2 188 A01 10469429 10469630 Contig1755 | m.4465 5 + 10469429 10469630 255,0,0 NA 201 0 मैं ऐसा कुछ कैसे कर सकता हूं? A01 10378809 10379882 Contig1401 | m.3412 101 - 10378809 10379882 255,0,0 1 1073 0 ए 01 10469105 10469293 Contig1755 | m.4465 48 + 10469105 10469293 255,0,0 2 188,201 0 असल में अगर यह एक अद्वितीय आईडी है (उदाहरण के लिए Contig1401 | m.3412 ), फिर कुछ भी मत करो। और अगर आईडी गैर-अनन्य है (या तो अगले लाइन या अगली पंक्ति के साथ साझा की जाती है ... उदाहरण के लिए ... उदाहरण के लिए Contig1755 | m.4465 ) फिर पूर्ववर्ती रेखा से v11 का मान पेस्ट करें ? मैंने बहुत कोशिश की लेकिन एक रास्ता नहीं मिला। किसी भी विचार की सराहना की जाती है। यदि आप केवल एक कॉलम में रुचि रखते हैं, तो आप निम्न कर सकते हैं: df & lt; - ...

javascript - What is this script doing? -

I have an ASP.NET MVC 4 application. This referrals to a JS file like this: & lt; Script type = "text / javascript" src = "http: // localhost: 32967 / script / micros / mscript.js" & gt; & Lt; / Script & gt; A block time was seen in the browser while downloading this script. Googling for this, I got a reference When this script is added it has been blocked. In reality there is no blocking for any other script references. There was a big boost in this. Does anyone please tell me what this script is? If this can be blocked by doing this then why is not it the best practice? [ Update ] I changed script name from Script.js to MyScript.js because it is var urls = {commonUrl: "Http: // localhost: 32944 /", myappurl: "http: // localhost: 32967 /", productUrl: "http: // localhost: 49880 /" } This is in that file. Regards. reference. Js is only in the form of a list of files that provide intellis...

android - Listview containing edittext -

I have listview and its rows are made from some editors . My problem is that its value changes automatically when scrolling . I have tried many ways but none of them works. Is there an example related to this? Anybody please help me Public class increases main activity activity (private list view myList; personal custom adapter myAdapter; context reference; personal string [] estimation = new string [20]; ArrayList & lt; String & gt; List_id = New Arrayouschi & lt; string & gt; (); @ Override Protected Zero to Create (Bundle Saved Instantstate) {Super.New (Saved Instantstate); setContentView (R.layout Activity_main); {list_id} for (int i = 0; i

Javascript copy content to clipboard -

I have found very old resources about this issue in search of the web. I hope it is a duplicate form I will not be considered, but I did not get any reply with new content. As browsers and JS are continuously improving, I want to know that the content should be copied to the clipboard using only javascript and clipboard API There is no chance flash plugins Limitations on the use of the clipboard are related to security so I'm afraid that any further "improvements" The potential operation has to be reduced. What you can do now is to access the clipboard to cut / copy / paste using hidden text fields. User can use standard hotkeys (like ctrl-x / ctrl-c / ctrl-v ) To begin using it. The idea is that a program should not be able to reach the current content of the clipboard for example, unless the user does not know that this is happening (because he / c is typed ctrl-v).

php - How to write PHPDoc for parameters not specifically specified in the function declaration -

If I have a parameter, then I'm logging in like this $ msg = Input.get ("message"); Do I also use the ultimate tag, or this parameter only like public function stepfile ($ user, Thank you. In addition, when you return a Jason object, what is the correct way of the document thanks. JSON is not a recognized php datatype, so you can use that string or stud class in a real way, on which JSON Is represented by the $ msg variable. If you want a datatize document for $ msg, then there is an informal syntax that will recognize some IDEs: Again, this is an unofficial syntax that > Some ID IDE will recognize that some IDE instead of the DATTIPYPE search for the name of the variable name They are: / ** @var $ msg string a JSON string * / Neither is considered to be "standard" usage, but the first one Has been proposed to standardize in PHP-FIG's PSR-5 format. I suggest using it, and if your IDE likes it, then only use other synta...

solr - Is any way in solr3 slave create update delete will reflect on master also -

Is there any way in solr3, to create an update on slave, also be reflected on the master? No slaves are only slaves and can not control the master if the slave master records / edit / The entire purpose of master / slave was defeated if he was able to remove. Ideally, any data configured for the slave should not be the import handler (DIH), and it should only be a master for making, updating and using; Delete the document Slave just replicates what is master indexed. The end of the story! Shishir

java - Apache Ivy dependencies force="true" does not work -

Commons-codec is the dependency of my project and uses Ivy. Some other dependencies are Commands-Codec-1.6 and 1.2. Now my problem is that ivy reveals my version (1.4) and uses 1.6 instead. # & lt; Dependency org = "commons-codec" name = "commons-codec" force = "true" rev = "1.4" /> Why not force to work? Has anyone ever encountered it? FYI I used it before and it works ... You need to use a director, which is to override the basic behavior, which must be selected from the latest revision of that dependency. For example, see the following answers:

javascript - Open a popup containing ASPX postback result -

I have an ASPX page that produces PDF documents with multiple fields when I use the "export to PDF" button I click on Now I want a "Print PDF" button in Javascript which does something like this: w = window.open (?); W.print (); W.close (); Where "?" will do the same postback in my "export pdf" button. If you have to submit your form in a new window, you try to change the duplicate form target Such as: Var form = $ ("form"); Form.attr ("target", "__foo"); Submit a form. form.submit (); Remove the target (Settimet (, 1) - Event at the end of the "Event-Q", in our case - after submitting the form): setTimeout (function () {form.removeAttr ("target");}, 1); Also, before you can try opening the window with __foo id for more style, and a new form (postback) will be submitted in this window instead of the new one. : var wnd = window.open ('', '__foo...

How to store image from picturebox to database, in sql server 2008 using c# (VS 2010) -

itemprop = "text"> im new to c #, somone Please tell me how to add images to a database, using the # from the picture box Tax. I have a registration form that the user has been added to the database (SQL 2008), but I do not know how to add a user's image to a database, which contains a column of the user's multiple columns and a picture. SQL's & lt; 2008 & gt; You must have a binary field in DB. There should be a binary field in DB for this. Save yourself and read it in DB but it is not gog practice for me. I usually save the image in the cloud or folder and in DB - URL only

iText Java - add header to an existing pdf -

I want to add a header to an existing PDF using iText. I did not have any problems other than that sometimes my function creates a PDF with the right header and footer, but it is rotated with the current PDF page. Private static zero print (Sldocument item, string header, string footer) {try string string ftpFilename = item.getId () + "_" + item.getDocumentname (); String newName = String.valueOf (item.getId ()) + ".pdf"; String path = (global. SHARED_FOLDER_DEVELOPER); String smbUser = "**" "+" ** "+": "+" ** "; NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication (smbUser); Smbifail sFile = new Smbifail (path + Fteepifailnam, Auth); InputStream = sFile.getInputStream () in; PDF Reader reader = new PDF reader (these); // output Create PDF document = new document (Pejasijh. a 4); SmbFile sFileOut = new SmbFile (path + new name, Auth); SmbFileOutputStream sfos = new SmbFileOutputStream (sFileOut); PDF ...

java - override close action in eclipse editor -

I have an eclipse RCP application, in which I created an editor which spreads the EditorPart: text after "itemprop =" text "> I want its pass () editor to act in some release resource, so I have to take action or a method that just takes action before closing the event Came to want to override. I had tried settlement () but for this to work on it for a long time. Or there is any specific listener listening to the event near. I want to do this: @ override public zero-off () {// do some relational releases related work} Update :. Basically I want to stop the event close to an editor You can use IPartListener For this purpose: spreads yourEditor to the public class EditPart {@Override Public throws init (IEditorSite Site, IEditorInput Input) PartInitException {getSite () GetPage () AddPartListener (New IPartListener) {@Override Public Zero partOpened (IWorkbenchPart part) {// TODO Automatic Created Method Stub} @Override Public Zero part...

ios - How to Modal or Present a viewController in Cocos2d V3? -

How do I present or control a view controller from the Cocos 2DV3 view? I am trying to add a game in the ViewController in a game I created in Cocos 2D V3.x which is loaded with the traditional HelloWoldsin but from what I have searched and searched so far It has not worked. (OpenGLView, AppController) I had left and tried to add a view by adding the following two rows - Loginviewer controller * myView = [[Log Inview controller alloc ] Init]; [[[CCD Citizen Share Director] View] Window] Adsview: MyViews]; It presents a view at the top of the scene, but is setting anything. Delegate = self crashes on any application I believe this because I am loading a view instead of a view controller that leads to my main question. Any help would be greatly appreciated! I do not know why it was not working on other efforts for me, but it is still That's my answer for someone who spends 3 days to find it - #import "LoginViewController.h" - (zero) loadMyView {login...

vb6 - Getting the range in when given two date between -

I have a simple program in VB6. I have two text boxes and a list box. I put date ranges in the text box And the result comes in the list box. Example one text box 02/05/2012 and second text box 02/10/2012 Results list comes in the box 02/05/2012 02/06/2012 02/07/2012 02/08/2012 02/09/2012 02/10/2012 If any dtEnd as a date, dt dtStart date as any one guide I If there is no valid date in MSBX "Lesson 2" then if there is no valid subdivision in text / then IsDate (Text1) then MSbbox "text 1 does not have a valid date" Quit the end if dtStart = CDate (Text1) dtEnd = CDAT (text2) 'Clear list list list 1. Clear as date for D. dt.nd list for d = dtStart 1. AddItem d next

compare - Capturing matching and non-matching values between two dataframes in R -

I have read a lot on this, but I still can not find any answer that still works. I am using the setdiff function in R to see the number of matches between the two dataframes. I know that I have more than 200 200 comments and the remaining non-match check = setdiff (dataset 1 $ variable1, dataset2 $ variable1) So far I've done this to get the number of matching and non-match values ​​ How do I return a list of matching and non-matching values? thanks, ed all set deserves Match values ​​come with the intersect function. All values ​​in both variables meet with the union function, so values ​​which are in the union, but are not in the hole. var1 & lt; - Characters [1: 5] var2 & lt; - Characters [4: 8] Milan & Lt; - intersect (var1, var2) all & lt; - Association (var1, var2) non.matched & lt; - all [! % Match in all%]

BASH - Check that it is not running the same script -

मेरे पास स्क्रिप्ट / रूट / डाटा / माइस्क्रिप्ट है और जब मैं / root / data / Myscript मुझे पता नहीं है कि आपके पास एक चल रहा है या नहीं क्या किसी को पता है? मैंने कोशिश की अगर [["$ (pidof -x / root / डेटा / myscript | wc -w)" & gt; "1"]] तो "यह स्क्रिप्ट पहले से ही चल रहा है!" फाई धन्यवाद यह काम करना चाहिए। यदि [["$ (pgrep myscript)"]] तो "यह स्क्रिप्ट पहले से ही चल रहा है!" Fi

matlab - Manipulate specific regions of matrix -

I want to manipulate a matrix / look-up table in the matrix: Matrix is ​​working here: 0 5 10 15 20 25 30 35 40 45 50 0 3 4 5 6 4 5 5 5 5 20 3 4 5 6 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 41 4 5 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 5 5 5 5 4 5 6 5 4 5 5 5 5 The first column and row I want to use as my variable, for example, for example if I manipulate a specific area I want to, how do I do this? Like all prices had to be multiplied by 5 - 15 (the top row) and 20-41 (the first column) 1.33. Ideally, I want to use it in GUI but I want to get this concept to be understood first because I am still a new user for the software. Thanks for all help, kind of relationship, Sam Use, to combine lines and column positions (can also be done with repmat ). Then use that index to apply the desired operation to the selected entries. Let A denote your matrix: ind = bsxfun (@and, a (1,:)> = 5...

php - Looping through an array and check if checkbox is set -

I have a dynamically generated table on the page (based on the result of a query) I now check with the entry and checkbox I pass the box names in an array. The array is like a value like 10, 25, 26 ... in this value (checkbox-name) field with "Entry_ID" as well as Field-Defighter on other databases. What I would like to do now is to check whether the checkbox is "on" on the dynamised generating table and update a field in the row with respect to "1" (review_done). My code looks like ATM: (and does not work) if (isset $ _POST ['retain'])) {$ lines = $ _SESSION ["Countro"]; $ Chkb_names = $ _SESSION ["arr_chkb_names"]; // print_r ($ chkb_names); ($ C = 0; $ c & lt; $ rows; $ c ++) {If isset ($ _ POST ($ chkb_names [$ c])) & amp; $ _POST ($ chkb_names [$ c] == 1)) {$ Sql ​​= 'UPDATE testDB SET review_done =? WHERE entry_id =? '; $ Result = $ db- & gt; Ready ($ sql); $ Result-> Bind_param ('ii...

javascript - How to use images instead of text labels with google charts API? -

How am I using the Google Charts API to use images instead of text labels? An example here comes in jsFiddle: The main problem here is that if I had a new element, I would have to add a new image manually. Is there a way to swap label text for images? For example, setting my array with var array [['name', 'lead', 'proposal', 'opportunity'], [ 'John', 1000, 7000, 10000], ['& lt; Img src = "http://s13.postimg.org/up2b680dv/images.jpg" /> `', 2000, 3000, 12000], [' N ', 2000, 5000, 12000], [' Steve ', 6000, 2000, 10000], [' Rachel ', 10000, 4000, 9000]]; I am facing the same problem, I suggest that after the chart is ready, you take the place in the dome, IMG is the src, for example replace it with a specific reference up2b60dv and then replace it with the code with the script above.

php - why does a caught exception still break a loop? how can we make it continue? -

I have given an example of this issue that I am running, in my (possibly incorrectly) way of thinking, a catching exception Should not cause the loop to break; This means that the loop faces an exception, throws it, the exception is handled, and then the loop should continue, will not it? The problem is that this is not happening, loop is breaking on its first exception, even though it is in an attempt / hold block I am misunderstanding here? How can I make this work as expected (I hope both exceptions will be handled and A, B, C, D properties will be set). I have created a demo here: Code: & lt; Php abstract class xGrandparent {public function __construct ($ params = array) {foreach ($ c => $ params as $ v) {if (Property_exists ($ this, $ k)) {$ this- & Gt; $ K = $ v; } And {switch ($ k) {case 'e': throw a new exception ('exception e', 111); break; Case 'F': Throw New Exception ('Exception F', 222); break; }}}}} Abstract class xgra...

java - JTable with editable checkbox -

The code below is one of my project class. It will produce a frame with jtable when I click Find button Some data will be loaded into the table dynamically. The last column of the table should be the checkbox with the event. I have tried this code for the checkbox (it is not being taken from any other project ... not working) DefaultTableModel dtm = New DefaultTableModel (Data, colName) {Public class GetColumnClass (int c) {return (c == 5? Boolean class: string class); }}; Actual class public class BookReturnPanel {JPanel retunBookPanel; JTextField txtRegNo; Jebton BTNFind, BTN Save; JTable retunTable = Faucet; Public JScrollPane jScrollPane = null; Private IT; Static object [] [] data; String regNo = null; Member member = null; Default table modell model = new defaultTableModel (); / ** * Create Panel * / Public BookReturnPanel () {} Public JPanel getRetunBookPanel () {if (retunBookPanel == zero) {retunBookPanel = new JPanel (); RetunBookPanel.setLayout (zero); Model....

sql server - How to deploy a C# windows form application that has database on another PC? -

I am trying to publish the c # windows form application, which contains approximately 15 forms, 4-5 datagrids, datasets etc. Are there. I have developed this app on my PC and has a database that has been developed on SQL Server 2012 (not express). Now I want to run this app on another laptop, which is connected to my network on any LAN. I want to run this app on that laptop but still using the database on my laptop. On my laptop, the connection string exists in App.config. Here is here: Now how can I change the connection string so that it works on another laptop but still connect to DB on my laptop? I hope you understand my question. Regards. Use the name of your laptop as bellow Source = myServerAddress; Or use your laptop or IP: data source = 192.0.0.1,1433; P> "ST" connection string = "data source = 192.0.0.1 \ SQLEXPRESS; initial catalog = ST; integrated security = true" provider name = "system.data. SQL cli...

android - startActivityForResult is not working in Fragment -

I am currently working with piece. I want to take an image from the gallery; To display this piece square. But here startActivityForResult () not working in piece My piece square button loadimage = (Button) view.findViewById (R.id.loadButton); loadimage.setOnClickListener (New OnClickListener () {@Override public void onClick (View v) {// TODO Auto-generated method stub Intent i = new Intent (Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); StartActivityForResult (i, RESULT_LOAD_IMAGE);}}); Override public zero at @activityResult (integer requestcode, integer result code, intent data) {super.onActivityResult (requestCode, resultcode, data); If (requestCode == RESULT_LOAD_IMAGE & amp; amp; amp; amp; resultcode == RESULT_OK & amp; amp; zero = data!) {Ury selectedImage = data.getData (); String [] filePathColumn = {MediaStore.images.Media.DATA}; Cursor cursor = getActivity (). GetContentResolver () Query (selected image, filePathColumn, ...

c# - XmlSerializer - Serialize elements without parent node -

This is my first question on stackoverflow, so it's going to be fun! I got the following structure that I want to convert to XML. I need to include all the sub elements from the internal object, without the internal object as the node. square element 1 {element1.1 {element1.1.1, element.1.1.2, element.1.1.3, element1.1.4,}} In other words, how can I serialize the following? & lt; Element1 & gt; & Lt; Element1.1.1 / & gt; & Lt; Element1.1.2 / & gt; & Lt; Element1.1.3 / & gt; & Lt; Element1.1.4 / & gt; & Lt; / Element1> I am trying different combinations with XML, XML, etc., but they are still working. Any word of advice would be deeply appreciated! Here the code will be: [XmlElement ("Element1")] Public class Element1 {[XmlElement ("Element11")] Public string Element11 {get; Set; } [XmlElement ("element12")] Public element element 12 {get; Set;}} Public square element 12 {[XmlElemen...

java - Converting Json to XML Generated invalid XML -

कृपया निम्नलिखित पर एक नज़र डालें। आयात करें java.io.buffferedReader; आयात करें java.io.File; Import java.io.filewiter; आयात java.io.IOException; आयात करें java.io.InputStreamReader; आयात org.json.JSONArray; आयात org.json.JSONException; आयात org.json.JSONML; आयात org.json.JSONTokener; आयात org.json.XML; आयात करें com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider; आयात com.amazonaws.regions.Region; आयात करें com.amazonaws.regions.regions; आयात करें com.amazonaws.services.s3.AmazonS3Client; आयात करें com.amazonaws.services.s3.model.GetObjectRequest; आयात com.amazonaws.services.s3.model.S3Object; सार्वजनिक वर्ग जेसनटीओएक्सएमएल {निजी अमेज़ॅनएस 3 क्लाइंट एस 3; सार्वजनिक JsonToXML (स्ट्रिंग inputBucket, स्ट्रिंग inputfile) IOException, JSONException {// S3 S3 = नए AmazonS3Client के लिए कनेक्शन (नई ClasspathPropertiesFileCredentialsProvider ()) फेंकता है; क्षेत्र हमें वेस्ट 2 = क्षेत्र। टैग (क्षेत्र। US_EAST_1); s3.setRegion (usWest2); // ऑब्जेक्ट सिस्टम को डाउनलोड करना। Ou...

How do I get the current url in web2py? -

How do I get the full URL of the current page in web2py? I need a URL (possibly redistributed) in the browser address bar. For example This is probably the easiest way to generate: URL You can also collect URLs like this: '% s: //% S% s'% (request.env.wsgi_url_scheme, request.env.http_host, request.env.web2py_original_uri)

rdf - SPARQL property path query -

I am trying to use SPARQL 1.1 property path with VirtuosoOS 6.1 but something is wrong. I use the next graph: @prefix foo: & lt; Foo / & gt; . @Prinfix Bar: & lt; Bar / & gt; . @Primfix type: & lt; Type / & gt; . Bar: a1 type: read foo: b1 times: a1 type: type foo: b2 bar: a1 type: write foo: b3 bar: a2 type: read foo: b4 times: a2 type: type foo: b5 times: a 3 Type: Write Foo: B6 Foo: b2 Type: Link foo: b4 Foo: B4 Type: Link Foo: B6 Let me know all the "linked" fu "s Finding that starts with X, where x is: a1 --- (Type: write) -> X. Clearly the answer is foo: b4 and foo: b6. Then , I use this query prefix Answer: Select but virtuoso says virtuoso 37000 error SP030: SPARQL compiler, line 8: syntax error '? Y' '}' before What is wrong with my query? Perhaps virtuoso does not support this feature? You can check that your query is legal The Akyvinyas. Your query is well-formed, so this is an issue with ...

javascript - Binding nested elements -

I am learning the knowledge and I do not have experience in web development, so I'm not sure that I have the right approach there is a problem. I have this controller: Function Message Controller ($ Scope) {$ scope.messages = [[Body: "This is a video", type: " Video ", linkview:" http://www.youtube.com/watch?v=sIR3KAfhqZQ "}, {body:" This is an image ", type:" image ", linkview:" http: // www .dimensionsinfo .com / wp-content / uploads / 2009/12 / smallest-violin.jpg "}, {body:" this is just text ", type:" newtext ", linkview: null}]; } In my opinion, I want to take a template based on the type of message so that I used the ng-repeat and there is a ng - The following as the switch : & lt; Div ng-controller = "MessagesController" & gt; & Lt; Div ng-repeat = "message in message" & gt; & Lt; Div ng-switch = "message.type" & gt; & L...

jquery - Make sure that only one radio button is selected -

I need to check that only one radio button (in two) has been checked. Generally you add the same name = "some" to all radio buttons in the group, but in this case they do not have the same name - and unfortunately, I can not change it. I have, but I do not know how to do this: var check 1 = $ ('#A') ; Var check2 = $ ('# two'); Var allChecks = check1, check2; AllChecks.change (function () {allChecks.each (function () {$ (this) .attr ('checked',! $ (This) .attr ('checked'));}); return false;}); and: & lt; Input type = "radio" name = "one" id = "one" & gt; & Lt; Input type = "radio" name = "two" id = "two" & gt; You can do something without modifying your html: $ ("#A"). Change (function () {$ ("# 2") .prop ("check", wrong);}); $ ("# Two"). Change (function () {$ ("#in") .prop ("check", w...

javascript - Cross-Browser way to select text -

I have a p element, how can I choose the text inside javascript Will be - browser? & lt; P & gt; Some text to choose from & lt; / P & gt; I want to select that text on click (like you use the mouse pointer and move the cursor) This can be a jQuery solution. In the comment, I was able to write the jQuery plugin with the help of @ADNow, select the text $ .browser has been removed, so it's jQuery & gt; Works for 1.9. $ .fn.sel = function () {var node = this [0]; If (document.body.createTextRange) {var category = document.body.createTextRange (); Range.moveToElementText (node); Range.select (); } And if (window.getSelection) {var select = window.getSelection (); If (select.setBaseAndExtent) {selection.setBaseAndExtent (node, 0, node, 1); } And if (document.createRange) {var range = document.createRange (); Range.selectNodeContents (node); Selection.removeAllRanges (); Selection.addRange (range); }}};

css - How do you avoid class name collisions? -

Assume that I am creating a blog and adding a class called "post" for timeline positions. Then another developer comes and creates a Highlights section, which also has a "Post" class. Suddenly we have a collision. I usually solve it by nesting classes and do not keep anything "global", but what I have understood is that this is not the best practice: .main .post {background-red color; } .highlights .post {background color: green; } When I inspect the large sites CSS files, I see the weight of the global class names for the proper parts of the page, so I'm really thinking that they How to solve it. Do they search and scan the entire project for a class name before adding it? What do they do if they want to add something that already exists? For this, just changing its name really looks like bad behavior. If any Use some form of framework / methodology that implements discipline such as or

How to get the data from json in jquery -

When I click on the event, I want to get value from Jason Set and that value is stored in a variable and The function is passed html & lt; Ul class = "list-group" & gt; & Lt; Li class = "list-group-object" id = "driver 1" & gt; Driver 1 & lt; / Li & gt; & Lt; Li class = "list-group-item id =" driver2 "" & gt; Driver 2 & lt; / Li & gt; & Lt; Li class = "list-group-object" id = "driver 3" & gt; Driver 3 & lt; / Li & gt; & Lt; Li class = "list-group-item" id = "driver 4" & gt; Driver 4 & lt; / Li & gt; & Lt; Li class = "list-group-item" id = "driver5" & gt; Driver 5 & lt; / Li & gt; & Lt; / Ul & gt; Jquery var driverLocation = {"Driver1": "12.98180953,77.44056702", "Driver 2": "12.89079587,77.35954285", "Driver 3 ":" ...

SAS macros to average between a range of dates with missing dates in the data -

I'm completely new to SAS and its macro. I have this dataset, whose name is mydata: object symbol is DATE kx y 1a 20120128 5 6 2b 20120128 10 7 3C 20120128 20 9 4D 20120128 6 10 5 E 20120128 9 20 My problem is to find this function: Newi = â ???? Ja ?? ¬ [-10, -2] (x + y) i, j / n, ou, i = no random date (user defined) ) Total number of days with data available for (x + y) between N = (-10, -2) -10 and -2 (10 days or two days ago) = Dates may be missing in available data. Can anyone help me with the possible SAS macros for the following problem? Thanks in advance! I assume that your date data is stored as dates and the numerical calculation is accepted Can do. I also believe that you want to get an average of X and Y for a specific date around D, where the D user has been defined. After all, I agree that if you have two unique IDs on the same day, then you first put it on a random one. Of course, those perceptions may need to be touched a bit, but wha...

php - Laravel Schema::create ignoring table prefix when run from Unit Test -

I have an unit test that is running cede I create a new instance to build One of my classes is when I run cedar from artisan, then it runs without problems. However, when the unit test does this: class increases MyClassTest TestCase {Public Function Setup () {// Setup Application Parent: Setup ( ); $ This- & gt; Seed ('MyClassSeeder'); } ... refused to use the prefix Class MyClass has switched to base {// correct DB prefix protected function prefix () (db :: connection ('main') -> set-up parameter ($ this-> id '_'); $ this return;} // It is run by cedar, everything works fine here ... public function setup database () {$ this-> prefix (); // gives it "1001_", which is the correct log: : Info (schema :: connection ('main') - & g T; mill connection () -> getTablePrefix ()); // schema :: connection ('main') -> gt; hatable ('myTable')) {schema :: connection ('main') -> gt; ; Instead...

c# - Problems with EntityFramework.HierarchyId -

I try to add support for the use EntityFramework.HierarchyId Nuget package HierarchyId datatype, problems within the EF 6 is that everytime I package and tries to project, I get the following error: error 3 type 'System.Data.Entity.DbContext' is defined in an assembly, which is not referenced. You must add a reference to the assembly 'EntityFramework, version = 6.0.0.0, culture = neutral, publicKeyToken = b77a5c561934e089'. > If I remove the package and restore the EF 6.1 problem has ended. This is in my web .config file: & lt; ConfigSections & gt; & Lt; Section name = "entityFramework" type = "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = 6847f3395fc61b47" requirePermission = "false" / & gt; & Lt; / ConfigSections & gt; If I tell the version to be an error, then the problem still remains: & lt; Co...

javascript - Show large image when click on small image -

I am trying to show a larger image when I click on a smaller image, I have an SQL table in which I store the image I then display it to the image in IGM control, but now when the user clicks on this image, it will open in a big size popup. My code is to recover the image in the IIG control and display it in IMG control & lt; Script type = "text / javascript" & gt; $ ('# Image1Large') Hide (). Click (function () {$ (this) .hide ();}); $ ('# Image1'). Click (function () {$ ('# image1Large'). Attr ('src', this.src) .show () .offset ({top: 0, left: 0});}); & Lt; / Script & gt; & Lt; Img runat = "server" id = "image1" alt = "src" = "" height = "100" width = "100" /> & Lt; Img runat = "server" id = "image1 large" alt = "" /> Protected Zero Load Image 1 () {SqlCommand CMD = New SqlCommand ("sps_getimage", con); Cmd...

ios - Downloading Javascript for execution in UIWebView versus JavascriptCore -

The terms of the iOS license are stated in: 3.3.2 download an application or Can not install executable code, the code interpreted can be used only in one application if all the scripts, codes and interpreters are packaged in the application and not downloaded. The only exception to the foregoing is to download the script and code and run by Apple's built-in webkit framework, provided that such scripts and codes are incompatible with the purpose of providing facilities or functionality and do not alter the primary purpose of the application. As presented to the App Store Which is a minor variation for the words As discussed here. Which is arguably the part of the WebKit framework built into UIWebView within UIWebView if you download and execute javascript, then it can be executed. UIWebView, but what is the situation of downloading and executing javascript using javascriptcore? Javascript is considered part of the webkit framework JavaScriptCore believes that the...

java - Bind ToggleGroup bidirectionally in javafx -

Imagine having a mouse-mode an enum to define itemprop = "text"> after public Imagine being made with enum MouseMode {selection, editing, deletion} and a toggle-group 3 button: ToggleButton Selection = New ToggleButton (" Choose"); Toggle edit = new toggle ("edit"); Togglebutton removal = new toggle ("remove"); Togglup MouseSew = new toggle (); I need to field field MouseMode currentMode to be bidirectionally linked to toggle group. Whenever a toggle is set, the currentMode is switched accordingly, but it also converts some external process to CurrentMode (maybe press a key) then the togglegroup optimizes accordingly. Can do this with 2 listeners, but I wonder if there is a way to make custom bidirectional maps. I do not think there is a way to do this directly. While a general purpose Bindings.bindBidirectional (asset property1, property & lt; t & gt; property2, the function & lt; s, t & gt; ; Map...

asp.net - Carriage returns in html table -

I am having trouble displaying the returns in the html table, giving it as a line. I get data from a SQL 2012 database, but it is weird because it shows returns when I edit data in a text field. Any thoughts? Public Action Details Details (id = 0) {cursorModelWorkoutModel = DB. Workoutmodals.find (id); If (workoutmodel == zero) {return HttpNotFound (); } See Return (workoutmodel.WorkoutDetails.Replace (System.Environment.NewLine, " ");); } The text will show the returns in the fields but you will have to purse the return on the break in HTML. As: My text with a \ r \ n line break. is created: a & lt; Br / & gt; My text with line breaks

java - Nothing appears when I try to create a JFrame. (JButtons, JMenuBar etc.) -

I am working on a pathfinder program which uses GUI. I try to run the program before adding some things. And all this showed up fine. But after doing some more work on it, stopped showing the buttons and menu bar. Here is the code. Some variable names are also in Swedish, but I hope this will not be an issue. (Please note that the program has expired.) Thanks in advance! import java.util. *; Import javax.swing *; Import java.awt. *; Import java.awt.event. *; Import java.io.file; Public Square Pathfinder Provides JFrame {Jebton Hitta VG, Visa F.B.Bendails, Annaplets, NAFA, BBindles, NAFARFAURBandelse; JMURbar manibar; Jemanuitam NA, Eslutah, Hitovi Manami, Visa, frontbindelsemeni, naplatsmeni, NAFAURbindelsemeni, ÃndndraFàbindelsememeni; String str = System.getProperty ("user.dir"); JFileChooser jfc; BuildPlan Build = Null; Pathfinder () {Super ("Pathfinder"); Set layout (new border layout ()); Setisse (590, 400); SetDefaultCloseOperation (EXIT_ON_CLOSE); Se...

java - Something is wrong with my timer gui panel -

I am making a timer to go with a Sudoku Grid IM and the code in bold spoken is making errors to me and I do not know why if someone can point out any mistake and provides a solution which would be helpful thanks. import javax.swing. *; Import java.awt. *; Import java.awt.event. *; Public class Timer Jepianel (private Jeelabl time display; private Jebtn Risetbtn; private Jebtn Startbtn; private Jebtn Stopbutn; public Timer () {final Timer; Startbutton = new Jebtn ( "Start Timer"); Stopbutn = new Jebtn ( "Stop Button "); Taimdisple = new Jeelabel (" ... waiting ... "); Risetbtn = new Jebtn (" reset timer "); this.add (resetButton); this.add (startButton); this. Add (stopButton); this.add (timeDisplay); Class TimerClass ActionListener's Function Wyn {int counter; public Taimrclas (Int counter) {this.counter = counter;} @ Override public void Akshnprrfed (ActionEvent TC) {counter ++;}} class Startbtntnakshn Akshnlistr (public void Akshnprr...

ios - cookie passing between viewcontrols -

I have developed iphone app's my questions. I have created php - mysql script and then I created the login screen on xcode. I send the http request and I read the cookies. But I want to control some other ideas. So I need to save phpsessid cookie and send http request with cookies. My question is how do I? First view (login screen) .m file #import "Second viewHolt" // If you want to get all cookies: NSArray * all = [NSHTTPCookie Cookieswith Response Headerfield: [Feedback All Headfield] forURL: [NSURL URLWithString: @ "http://www.iosapp.com"]]; NSLog (@ "how many cookies:% d", all.count); // Store cookies: // NSHTTK Cookie storage is a singleton. [[NSHTTPCookieStorage Share HTTP Cookie Stost] Set Cookies: URL for All: [NSL URL URL String: @ "http://www.iosapp.com/"] Main document ur: zero]; // Now we can print all cookies: for (NSHQPKKY * cookie in all) {SECOND VUUUTURlUm * MVUCentroler = [[SecondViewControl ALLOC] IntuitCookie: cook...