Posts

Showing posts from September, 2012

osx - AppleScript duplicate folder inside pre-existing folder -

I am thinking that there is a way to use aplscript to duplicate a folder, and all files / folders In the second place - when leaving any file inside the location? Tell the application "finder" duplicate folder "Macintosh HD: User: YourCompName: Desktop : Test1 "to" Macintosh HD: User: YourCompName: Desktop: Test2 "

database - How to read file line by line and put it into orcale db -

"itemprop =" text "> This is my file that I want to read: - 20140901 | 2X-PRG-CZ | PRG | 2x | 2x-PRG-CGD || TIPX || QXXXX | QS | QS-PRG-GW | PRG | TEPB | Y 2 | 98 | 0 | 0 0 0 0 9 0 | 2x-PRG-CZ PRG | 2x | 2X-PRG-CZ ||| TAEPX || QXtxGx | OK. OK-PRG-MQ | PRG | TEPB | Y 14 | 672 | 0 | 0 0 0 001 | 2x-PRG-CZ PRG | 2x | 2xpg-cz ||| TAPX || QXtxGx | EK | EK-PRG-KK | PRG | TEPB | Y 1 | 48 | 0 | 0 0 0 9 01 | Xs-esin-ol | MAD | 3v | 3 V-MAD-OO ||| STXOL || QXTXGXS | 7x | 7X-BRU-EP | BRU | TYPEB | Y | 1 | 59 | 0 | 0 20,140,901 XS-SIN-OL | MAD | 3V | 3V-MAD-OO ||| STXOL || QXTXGXS | 3v | 3v-lgg-sp. LGG | TEEPB | Y 1 | 193 | 0 | 0 0 0 001 | XS-SIN-OL | MAD | 3v | 3 V-MAD-OO ||| STXOL || QXtxGx | 7x | 7X-PAR-EP | Equal TYPEB | Y | 1 | 59 | 0 | 0 20,140,901 XS-SIN-OL | MAD | 3V | 3V-MAD-OO ||| STXOL || QXTXGXS | YA | Ya-MAD-GS | MAD | TYPEB | Y | 4 | 923 | 0 | 0 My standalone program is like this .. package com.dbConn; Import java.io.buffferedReader; Import java.io.file...

merge - git abandon master branch -

In my git repository I have created a new branch called alt. After some work it seems that Alt is my master In the branch, I want to leave the master and I want to make a new master. C1 | C2 / \ Master - & gt; C3C4 | C5 and LT; - alt So I want to sacrifice C3, but still want to put it in the history committed for future reference and return to one branch. What is the best way to do this? My first thought is to transfer the master from C5, and then to merge the Alt in the master. is this correct? Do I need to move the master first? I can also merge master to Alt, solve all the merge tribs by placing the version of Alt, and then rename it to master Alt. Or should I take the master to Alt and just remove the branch alt, leave the C3 as a fragmented branch, which is actually a reality? I think there are many solutions here, there is a best practice to follow (always return branches to velvety vs open-ended) I think the easiest way to merge the ours strategy to the ...

c# - WPF - How to databind subclass property correctly -

I have a very stupid problem with databanding in WPF. I have a custom exception type public class MyException: exception {public class throwning method {public class registered mode} {string registered name for public reading; // ...} public read-only registered method regMethod; // ...} Public Read-Only ThrowingMethod Throw Method; OK, now in my wpf window, I public partial class exception display: window {Private Readonly IEnumerable & lt; MyException & gt; exception; Public exception display (IEnumerable & lt; MyException & gt; exception) {InitializeComponent (); This.exceptions = exceptions; } Private Zero Windows_Loaded_1 (Object Sender, RoutedEventArgs e) {DataContext = this.exceptions.First (); }} And I have two labels in XML: & lt; Label name = "message" content = "{binding message}" /> & Lt; Label name = "RegMethod" content = "{binding path = throwingMethod.regMethod.registeredName, mode = thwave}...

Store a 2D array within another array -- Java -

I should be able to store a 2D Boolean array within another array, which is as follows ... Boolean [] [] Player = New Boolean [1] [2]; Object [] game = new object [1]; Player [0] [0] = True; Player [0] [1] = Wrong; Game [0] = player [0] [0]; I should be able to set every game [] index with a player, but the one above does not work. Is there any way to insert an array into an array? If you want to store the 2D array game [0] Then you should do game [0] = player; Other points: I recommend you by creating a player class: class player {Boolean flag 1; Boolean flag 2; } Instead of creating arrays of boolean After your player array ( game ) the type will be player [] . Start the variable name with a lower name and the names of class begin with the case of capital. If you want to use actually arrays, I suggest you make a game to Boolean [] [] [] .

SAPUI5 get single property from JSON-Model -

Image
I am currently trying to figure out how I got a sap.ui.model.json.JSONModel In my main view: var gConfigModel = new sap.ui.model.json.JSONModel (); Var getConfigCallback = function (config) {gConfigModel.setData (config); }; OController.getConfiguration (getConfigCallback); Console.log (gConfigModel); In my controller: getConfiguration: function (callback) {var sServiceUrl = "/ sap / opu / odata / sap / xxx / configurationSet (' Start ') "; Var config = {}; Callback; $ .getJSON (sServiceUrl) .done (function (data) {config = data.d; callback (config);}); }, In your console.log statement, I can see that the data passed from the backend successfully and successfully set to the JSON model. The value of my requirement attribute is editable in a variable. I already have gConfigModel Tried .getProperty ('/'), did not work. Attempted to use GConfigModel.oData .. How can I store it in a value? Solution Comment: If you capture data from backen...

wpf - Nested ContentControls with template -

I have a custom window style , XAM looks like this: & lt; Style TargetType = "{x: type window}" x: Key = "WindowStyle" & gt; / ** Some Sets ** / & lt; Setter Estates = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "Content Control" & gt; & Lt; AdornerDecorator & gt; & Lt; Grid Background = "# 88000000" X: Name = "Windbikgram Grid" & gt; & Lt; Border x: name = "WindowContentBorder" background = "{DynamicResource WindowBackground}" maxHeight = "{binding source = {x: static SystemParameters.FullPrimaryScreenHeight}}" MaxWidth = "{binding source = {x: static SystemParameters.FullPrimaryScreenWidth}}" Margin = "20" & gt; & Lt; Grid & gt; & Lt; Grid.RowDefinitions & gt; & Lt; RowDefinition Height = "Auto" /> & Lt; Roadfinion height = "*" /> ...

windows - How can I write the text file content equal to file name? -

I have 100 empty text files whose content needs to be equal to their file name. An easy way to do this. is? Thank you I do not know what it is that you are looking for , But you can use the "forfiles" command: forfiles / m * .txt / c "cmd / c if @fsize equ 0 echo for example: in a.txt "A.txt". Update: Only updated to move text files with size of zero (empty) .

Issue while taking backup of mysql database table using php script -

Image
I am trying to back up mysql database table by using php script below, but by executing this script it Creating backup file but there is no data in it How to overcome any idea, please help me Script & lt ;? Php echo exec ('mysqldump -u [root] -p [123456789] -h [localhost] [android] [house details] --where = "added data = \' 2013-11-22 09: 17: 28 \ ' & Gt; Housestats. SQL '); ? & Gt; Try this: shell_exec ("mysqldump -u root-peepsword db_name table_name --where = \ "post_date in ('2011-12-15 06:14:55') \" & gt; /tmp/test.sql ");

xcode - SourceKitService Crashed -

Image
कभी-कभी मेरे पास Xcode 6.0.1 के साथ एक समस्या है, जहां त्रुटि "SourceKitService दुर्घटनाग्रस्त हो गया क्रैशॉग ~ / पुस्तकालय / लॉग / निदान रिपोर्ट्स "पॉप अप हो रहा है और सभी सिंटैक्स हाइलाइटिंग स्विफ्ट में चला गया है। मैं इसे कैसे ठीक कर सकता हूं? Xcode 6.1 (रिहाई, जीएम नहीं) के साथ इस समस्या है। वहाँ कुछ "जादू" समाधान है कि अस्थायी रूप से कार्य करता है, लेकिन पुनरारंभ की आवश्यकता होती है सामग्री : derivedData / ModuleCache को हटाएं (पूर्ण पथ) : ~ / लाइब्रेरी / डेवलपर / एक्सकोड / डेरिवेटडेटा / मॉड्यूलकैश)

android - Expected BEGIN_ARRAY but was STRING at line 1 column 1 -

Expected is BEGIN_OBJECT but STRING was at 1 row 1. Please give me this error My list provides class to parsed Jason to create an object ListOffers.java list of public class { @SerializedName ("ListOffers") @Efos Public List & lt; Offer & gt; Provides; Public Zero Set Listoffers (List & Offer; Offer & gt; Offer) {this.offers = offers; } Public List & amp; Offer; Offer & gt; GetListOffers () {Return provides; } Public ListOffers () {}} public class offering {public string user name; An example of a public string header; @ Describe the public string; Assess @public int discount; Assess @public string image 1; Assess @public string image 2; Assess @public string image 3; Assess @public string image4; Public expiration date; Public date date_posted; "", "Zero", "Title": "Zero Offer", "Details": "More Details", "Exempt": "0", "Image 1": "", "Im...

qt - QListView with custom item => mouse events are propagated -

Image
I would like to use QListView with a custom widget that includes QSlider and QSpinBox widget. I will give QListView a new custom item rep Succeeded in creating a custom widget that displays but the icons are not promoted in the event custom widget. It is not possible to slide QSlider or change the value of QSpinBox. The user can not interact with the item. I'm new to Qt and I think custom widgets do not have children in the catalog view. I tried to add visits to the list view (in item delegate controller), but that does not work. I also tried to broadcast an item representative event in widgets using QWidget :: event () Is there any idea? This is a custom widget: This QListView is displaying a custom widget: Here is the code of my custom item delegation: #include & lt; QPainter & gt; #include "layeritemwidgetdelegate.h" # / include "../../libs/debug/debug.h" Leyritm Viddet Diliget :: Layer Itam Videt Dieleget (QObject * ptParen...

Linked List to Array in java -

इस सवाल का पहले से ही एक उत्तर है: 23 उत्तर मैं लिंक्ड में बदलने की कोशिश कर रहा हूं नीचे दिए गए कोड में दिखाए अनुसार जावा में ऐरे की सूची आयात करें java.io. *; Import java.util। *; सार्वजनिक वर्ग लिंक्डलिस्ट {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) IOException फेंकता है {FileInputStream fis = new FileInputStream ("इनपुट"); LinkedList & LT; पूर्णांक & gt; Ll = नया & lt; पूर्णांक & gt; लिंक्डलिस्ट (); Int c; जबकि ((c = fis.read ())! = - 1) ll.add (नया पूर्णांक (c)); पूर्णांक [] arr = ll.toArray (नया पूर्णांक [ll.size ()]); Println (आगमन); fis.close (); }} निम्नानुसार इनपुट फ़ाइल के साथ 12 13 14 15 16 मैं संकलन करने में सक्षम हूँ लेकिन मुझे इस कोड के साथ कोई भी मदद कर सकता है? [ljava.lang.Integer; @ 2098746b क्या मुझे इस कोड के साथ मदद कर सकता है? यह एक त्रुटि नहीं है, कैसे जावा के डिजाइनर ने सोचा कि आपको मुद्रित करने के लिए सरणियों की पसंद हो सकती है: पी आपको प्रिंट करने की आवश्यकता arrays.toString (arr) कुछ समझद...

sql - Macros in MySQL queries -

For the purposes of data analysis, I often do very similar questions where I am collecting data with different dimensions. Always use the change, but the field I am collecting is always the same. In practice, I am key1, key2, ... sum (agg_field1), average (agg_field2), count (different agg_field3) ... to ... ... ou ... I have a lot of aggregation and if I can change the aggregation list by some kind of macros, then it will be a handful. I use the word "macro" because it Reminds me the C / C + macro I was imagining: select key 1, key 2, ..., from MY_AGGREGATIONS ... ou ... There will be a lot of benefits in it I will be more clear same adigrase It will be faster to write questions to other users You can develop a task where you can pass the parameter and use the loop you can create, dynamically query if you want to execute that query , You can develop the store process where you dynamically ask You can prepare and execute it. You can pass parameters...

python - ptrace single step followed by set breakpoint fails -

I have a debugger code using python ptrace To restore, do one step, Li> set the breakpoint again, Continue execution. On my system, immediately after step 2 ( single step ) step 3 ( createBreakpoint ), then with error message Something is wrong: ptrace.error.PtraceError: ptrace (cmd = 4, .. error # 3: no such process but If I add a delay (in the code below using the sys.readline ), all the steps and the debugged program are executed successfully. It is quite possible , Error for ptrace module Ishisht No, I was not the right approach recognizes welcome any help. Python code: import sys import ptrace.debugger.child import ptrace. debugger.debugger pid = ptrace.debugger.child.createChild ([ './sleeper'], 0) dbg = ptrace.debugger.debugger.PtraceDebugger () procedure = dbg.addProcess (pid, is_attached = 1) # # "# movel use "address gdb to" Disaimbl Men "- instructions between the two" calls "sPP = process. Biaarpeep...

yii url manager - Yii router rule to redirect a keyword to an action's $_GET Parametric -

In Yii, do the router rule for a keyword "Translate" for a keyword "$ _GET" in the URL Is it possible to use? Paramatric? What I need is to give this URL: http://example.com/MyModule/MyController/index/foo To indicate: http://example.com?r=MyModule/MyController/index&id=12 Where foo issue 12 . And, since I am using "path" urlFormat, and index and id = , pointing to the URL given above Should: http://example.com/MyModule/MyController/12 This is likely to set the rule in the config file for urlManager component ? Your action should accept a parameter $ id : Public Function Action View ($ ID) {$ Model = $ this- & gt; LoadModel ($ id); What you have to do, modify the load model function in the same controller: / ** * @ string or model to the absolute integer or ID Slug can be loaded * / Public function LoadModel ($ ID) {if (is_numeric ($ id)) {$ model = Page :: model () - & gt; FindByPk ($ id); } And {...

Full uninstall of Postgresql 9.3.5 -

I have installed PostgreSQL 9.3.5 on OS X 10.9.4. I also used the psql postgrace to create the database etc. Error in the postgresql now does not work where some issues ran: Could not connect to the server: There is no such file or directory that is local to the server Is running and is accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? So I uninstall Broad postgrace . Tried to reinstall, but keep getting the same error. I saw in the library ... and removed the Postgrascape folder. Is there a way to completely delete this thing? I am trying to re-establish this mac but it is not a way to find a long way to solve this problem. This should work if you had used Brava first to install postgres: brew uninstall Double check / usr / local / var / postgres has also been moved if installed with EnterpriseDB , Then use the second answer. You can also try it because it is uninstalling a full manual. Edit: After further review, it seems that...

java - mvn appfuse:full-source not working because of subversion -

I'm new to Maven. I have an Appface Maven project and it is embedded I wanted to make it as a full source , But he gave me the following error: failed to execute target org.appfuse.plugins: Apfus-Maven-plugin: 3.0.0: OOS on full source (default-cli) project: SVN: PROPFIND request failed on '/svn/appfuse_svn/tags/APPFUSE_3.0.0/data/common/src' I have found a solution to find more The information provided or the solution given in the site has been implemented: & lt; Trunk & gt; Https: //svn.java.net/svn/appfuse_svn/</trunk & gt; inside of the Appface Configuration Tag, after adding my line to my pom.xml file, I tried to run the MVN interface: full-source, but he gave me the same error. Here's the full stack: [INFO] Scanning for projects ... [Warning] [Warning] Something while creating an effective model for com.mycompany Problems had occurred: OOS: War: 1.0-SANPSHOT [Warning] 'Dependency Dependency Explore Conclusion: .artifactId fo...

c# - Problems with transactionScope and ServiceBus in production environment -

I have seen the other with similar issues, but I have not found any work solution yet. I am using UnitOfWork / EntityFramework for my database. This is my code / * list and adding to the unit author / repository / using .... (Transaction Scope = New Transaction ()) {_unitOfWork.Save (); ExportGroups (myGroupList); Scope.Complete (); } and here is a piece from the ExportGroups function Public Zero ExportGroups (IEnumerable & lt; Groups & gt; Groups) {/ * Generated BrokeredMessage Messages * / Task .Factory.StartNew ((=) = {MessagingFactory factory = CreateMessagingFactory (...), if (factory = null) {var this = factory.CreateMessageSender (TOPICNAME);; sender.Send (message); }}) stop(); } This works without any problem in my development environment but when we put it into production I get the following error "System.InvalidOperationException: Local Transactions are not supported with other resource managers / DTC " Machine capable of DTC and we...

r - Test for multiple strings in multiple columns -

I have searched extensively on stack overflow without getting the answer to the following question: I look for a function that I Examines if there are any special strings in some columns. # I'm looking for a barrier for heart attack & lt; - c ("b", "c") # I am also looking for stroke stroke & lt; - c ("h", "i") #sample Data set set.seed (1234) dat . I can get it to work if I check in only one column or just look after one of the stars. But I need to see if any of the wires are included in any of the columns, and in that case the date value is returned as a new variable. Any help is greatly appreciated. The following can help: & gt; [1: 5], x [5], NA) [1], [2] [, 3] [, 4] [, 5]] [, 6] [, 7] [, 8] [, 9] In the data.frame form: [6] [1,] "6" NA "3" NA "2" NA "7" NA "1" NA [2,] " 6 "" 10 "" 3 "NA" 2 "NA" 7 ""...

How to disable a text box and clear value with pure javascript when a checkbox is checked -

I have an input text in a checkbox and row. I want to clear the value of when a user checks the checkbox to dial text I tried this one but nothing: What's wrong? HTML: & lt; Span style = "width: 200px; font-size: 80%;" & gt; Input id = "chkSendSummary" type = "checkbox" name = "ctl03 $ ctl00 $ ctl00 $ chkSendSummary" onclick = "checkSendSummaryLetter ();" & gt; & Lt; / Span & gt; & Lt; Input name = "ctl03 $ ctl00 $ ctl00 $ txtSendSummary" type = "text" id = "txtSendSummary" class = "normal textbox" style = "width: 170px;" & Gt; Var chkSendSummaryLetter = document.getElementById ('chkSendSummary'); Var txtSendSummaryLetter = document.getElementById ('txtSendSummary'); If (chkSendSummaryLetter.checked) {txtSendSummaryLetter.enabled = true; } And {txtSendSummaryLetter.value = ""; TxtSendSummaryLetter.enabled = false; } ...

java - Run the code without Timer -

I want to run it without the timer . I've removed the timer variable and the function, but the code does not work, and I have the image without any changes I can run this code without the timer. I need only one Time to run Simple Solutions : Start timer and caller timer instead . Feel free to start (action), action (action) method to take action directly from the console. The Hard Path : There are so many in your code forgotten. Calling action is directly employed by your constructor, because there is no action to respond to nonsense. Try to start with executing code from action () method (method) in method form. at least. The next issue with your code is possible before the object is created. You should make at least Method Pane (public) and call it after the static wide menu (String [] ARGs) after the installation of the Imaging Panel.

javascript - How to align two texts on right in d3 -

How to align the text to the left of another text right? Two different element texts (one for numbers and one for 'R $') because each has a different style (like image below) "Https://i.stack.imgur.com/AxUrJ.png" alt = "Enter image details here"> To facilitate the example, make a small code in JSBin So that it is next to each value that you say? To wit. Such as " text = summary.append" text ".attr" text-anchor ":" end ", x: 250 text.append" tspan ".text" R $ ".attr" Class ":" summary-currency "text .append" tspan ".text (d) -> D3.format (', 0f') D.attr" class ":" summary-value "

JSON for command-line arguments -

It is believed that I want to write a tool which needs to accept some structured data, this command-line argument , And at that time, the environment? For example fudge_files "['file1', 'file2']" # The list of files can be used here fudge_files --dirs "['dir1' ',' Dir2 '] "pattern. * Or another .foo or in a more complicated example fudge_files - -dst "{'txt': ['/ foo', '/ Bar '],' pdf ': [' / foo ']} "pattern. * Is this good or bad idea? What are the disadvantages? Most (all) shells Once you have a valid "\" character in your data, it actually gets ugly. "You can come with hacks, but it will be painful and you can spend lot while trying to debug issues related to such quotes. And If you continue, and do this work, then, after 2-3 months, you might think that "I can put some of these in variables and eval to expand the variable in ...

c# - Unwilling server: Can't unlock AD account in code -

"postprint" itemprop = "text"> When I try to unlock an e account using my own C # program, I get the following error: System.DirectoryServices.DirectoryServicesCOMException (0x80072035): The server is not ready to process the request This code I use to unlock the account is. // "ldap" (DirectoryEntry entry = ldap.GetEntry (objectGUID)) is an example of its own class to access an LDAP server using {entry.InvokeSet ("lockouttime ", 0); // I also tried: entry Properties ["LockoutTime"] clean (); Entry.CommitChanges (); } I use this software in many domains and I get this error in one of them and I do not know what the difference is when i dsa.msc to unlock the account, everything works fine. The error also occurs with different user objects, but both versions ( Clear and InvokeSet ) work in other environments. Can anyone give me a hint PS:? I use the Domain Administrator credentials to access the LDAP server ...

How to run a php script on fpm via cli/php? -

I am doing a little research after searching and want to know that it is possible to run PPP scripts directly through CPI Is / php There are two workers implementations for Java and Ruby, which ultimately tells FPM from some parameters and I think it should be possible with php, right? Here snippet from java employee: FCG connection connection = FCGIConnection.open (); Connection.connect (new InetSocketAddress (message.getHeader ("fastcgi_host"), integer.parseint (message.getHeader ("fastcgi_port"))); Connection.beginRequest (PathResolver.resolve (message.getHeader ("dispatch_path")); Connection.setRequestMethod ("post"); Byte [] PostData = ("DEFERRED_DATA =" + message.getData ()). GetBytes (); To send stuff to FP, there is a command called cgi-fcgi (): SCRIPT_NAME = / ping \ SCRIPT_FILENAME = / Ping \ REQUEST_METHOD = Gate \ cgi-fcgi -bind -connect 127.0.0.1:9000 Is there a library or integrated function to do thi...

File upload with Rails 4 and Bootstrap -

It's probably a simple (?) Fixed, but I can not seem to find it. I am working on a rail site and almost finished I have a form in which the file upload field is included (using a paperclip) to optimize, I am following the following. I have this setup, but when I select a file, the file name is not being displayed. Here's the relevant bit of code from my site: CSS (currently) matches what's linked in the above linked guide. I think I need to convert : image to f.text_field to something else, but I can not understand it. Maybe it's a security thing. No problem, I thought there was some underlying method for it. It seems that I had to add JS

Why do my Android app get an Unknown Source Exception requesting short-lived authorization code in Google OAuth 2.0 flow? -

We have a project consisting of the Android app and web back-end, and as such it is registered in Google Console. The Android app is authorizing the user with their Google account (Google OAuth 2.0 Flow) We have been able to obtain an access token for accessing Google APIs. (The scope is: "oauth2:" + SCOPE_PLUS_LOGIN + "" + SCOPE_EMAIL + "" + SCOPE_PROFILE) " We are successful in obtaining an ID token, that the app can extend back-end too. (Scope: "Audience: Server: Customer_ID:" + SERVER_CLIENT_ID) The problem occurs when we ask for a short-term authorization code (required for offline access to back-end). GoogleAuthException: Unknown (unknown source) at com.google.android.gms.auth.GoogleAuthUtil.getToken. We know two things: The scope OK, because we have already tested the permissions and web_client_id in the case of login token and ID token. "Oauth2: server: client_id:" + "SERVER_CLIENT_ID" + ": AP...

Using random library functions in my own functions python 3 -

Why can not I use RudraZ this function? Random print (random.randrange (0,4) def defaults (dice): dice_one = random.randrange (1,3) return (dice_one) print (random (4)) import random print this error is line 6, error in random dice_one = random.randrange (1,3) attribute: 'function' object has no attribute 'any Also thanks for the help Python thinks you 're the name of the random module as you name it Since your own Field trying to call a method of random function. Change the name of your function something else and it should be fine. def chance (dice): dice_one = random.randrange (1,3) return dice_one print (chance (4)) Also, ensure It is not that you are trying to do with 'dice' logic if it is for the number of sides on the die, then try: def chance (dice): dice_one = Random.randrange (1, dice) return dice_one

mysql - How can I select values from dedicated 'fields' table? -

Image
मेरे MySQL डाटाबेस में मेरे पास दो टेबल हैं, यहां ये हैं: मुझे उन फ़ील्ड के साथ कुछ रिकॉर्ड रखना है जो तालिका निर्माण स्तर पर पूर्वनिर्धारित नहीं हैं, इसलिए मैं उस जोड़ी की तालिकाओं को अलग-अलग फ़ील्ड सेट के साथ रिकॉर्ड स्टोर करें। मैं उन तालिकाओं को निम्नलिखित रिकॉर्ड से भरता हूं: और मैं चुनिंदा क्वेरी लिखना चाहता हूं जो निम्न परिणाम लौटाएगा: क्या ऐसा करने का कोई तरीका है MySQL, या मुझे दोनों तालिकाओं का चयन करना चाहिए और मुझे परिणाम की आवश्यकता को पूरा करने के लिए उन्हें PHP पर क्रियान्वित करना चाहिए? UPD: कृपया इस बात का उल्लेख करें कि मुझे नहीं पता है कि पहले से ही खेतों के नाम क्या होंगे, इसलिए मैं चुनिंदा प्रश्नों में 'फ़ील्ड के नाम का हार्डकोड नहीं कर सकता। आप इसे गतिशील SQ के साथ कर सकते हैं एल कॉलम के नामों को पुनः प्राप्त कर रहा है और क्वेरी उत्पन्न कर रहा है (जैसे:) हालांकि मैं निश्चित रूप से इस के लिए PHP मार्ग नीचे जाना चाहता हूं। चयन आईडी, समय, स्रोत , एसयूएम (मामले में जब फ़ील्ड_नाम = 'लंबाई' THEN फ़ील्ड_वल्यूई एडीडी) एएस [लंबाई], ...

c++ - how to call a function in C++11 templates only when its defined -

इस तरह एक साधारण टेम्पलेट परिदृश्य देख रहे हैं: वर्ग ए {सार्वजनिक: int work (); }; वर्ग बी {सार्वजनिक: इंट काम (); }; कक्षा ऑब्जेक्ट प्रबंधक {सार्वजनिक: स्थिर शून्य प्रबंधन (ए एंड ओज); // प्रबंधन वर्ग बी} के लिए परिभाषित नहीं है; टेम्पलेट & lt; कक्षा T & gt; डस्टफ (टी टी) {टी। वर्क () .... ऑब्जेक्ट प्रबंधक :: प्रबंधन (टी); }; ए ए; बी बी; doStuf (क); doStuff (ख); मैं सोच रहा हूं, ObjectManager :: manage पर एक सशर्त कॉल को लागू करने का सबसे साफ तरीका क्या है? टेम्पलेट फ़ंक्शन को संकलित समय में निर्धारित करना चाहिए यदि ऑब्जेक्टमैनेजर :: प्रबंधन (टीटी) को दिए गए T के लिए परिभाषित किया गया है और कोड के कुछ लाइनों को केवल तभी सक्रिय करना चाहिए जब यह होगा। मुझे लगता है कि कुछ और नेस्टेड टेम्प्लेट कॉल के साथ समाधान हैं, लेकिन फ़ंक्शन को एक टुकड़े में रखने के लिए मेरे लिए सबसे अच्छा होगा। ध्यान दें कि वर्तमान में आपका क्लास सदस्य सभी निजी हैं उन्हें सार्वजनिक किया जाना चाहिए। टेम्प्लेट & lt; class T & gt; ऑटो कॉल_मेनिज (टी * टी) - & gt; Decltype (ऑब्ज...

java - Finding solution in TopCoder Arena -

I try to solve some problems in the area, but now I can not get there. I have a text of the solution: Definition Class name: MatchMaker Method name: getBestMatches returns: string [] method sign (make sure your method is public): string [] getBestMatches (string [] member, string current user, intel sf); Statement of problem A new online match maker requires some software that helps in finding the perfect pair. Those who answer a series of sign-up multi-option questions, when a member receives a 'Best Best Mats' request, the software gives a list of users whose gender is requested with gender and whose Answers to questions are equal to or equal to the equality factor compared to the user's answer. Apply a class MatchMaker , which contains a method getBestMatches . The method takes a string [] member , string current user , and an int sf parameter. Here is information about all the members in member . Elements of Members NAME GDXXXXXXX...

c# - EditorForTemplate inside a DisplayForTemplate MVC Razor -

I was trying to use HTML display for templates to loop through model data. The template inside my display, I wanted to use an editor, which would display a different set of data, in doing so, I was running on issues where my child model was empty. Upon receiving guidance and guidance from David, I was able to work it down, please find my updated working solution. Update (Correct Solution) Public Segment Targeting Overview {Public Ent dealer ID {get; Set; } Public IR Order Id {get; Set; } Public listing & lt; Targeting array order viewModel & gt; Targeting order order {get; Set; } Public targetingArevaModel () {this.TargetingAreaOrderItems = New list & lt; Targeting arrowheadmetmevalemodel & gt; (); }} Public Segment Targeting Order Order ViewModel {Public Entit order item {get; Set; } Public Input PackagesMediaType ID {Received; Set; } Public string PackageMediaTypeHeader {get; Set; } Public string MediaTypeDesc {get; Set; } Public string targeting AdditonalI...

rest - Security PHP RESTful API -

I am starting to develop a simple PHP Rasool API. After reading some tutorials, one of the features about the rest is that "... is the statelessness key. Basically, what does it mean that the state needed to handle the request The implied URI, the query string parameters, the body or the request of itself as part of the header " So, does that mean that my PHP server will not need to be $ _SESSION? What kind of approach do you suggest? Using a token (valid for a short period of time) in the URL does not seem to be a bit insecure? For example, www.myapi.com/1233asdd123/get_user/12 Many thanks. If you are a web developer of any kind, you might have heard this sentence 1000 times: " HTTP is a stateless protocol "This means that each session works with a token between the server and the client. When you use PHP's built-in sessions, the server is actually doing this exactly, even if you do not realize it: It generates a session_id and sends it to th...

shell - Javascript to load putty to a specific ssh host -

I am trying to create a website which is a link and based on those links, put it with a specific SSI connection Will load the host. (Its internal and i.e. 6) So far I have ignored the host What do I need you to do, succeed in doing this & lt; Script language = "javascript" & gt; Function connection (host) {var oShell = new ActiveXObject ("Wscript.Shell"); Ohh Run ('c: \\ archive program \\ cyst \\ putty.exe "-ssh' + + host + '22');} & lt; / script> & lt; a href =" javascript: connection ( '@ 1.1.1.1') "> Connection 1 I have a portability executable location (with the escape characters) as well as your code (Before EF-SST and 22 before), there is a need to include some spaces. As long as the putty can run standalone, you can put putty.exe in a network shared location all it To launch Shm and most important: a consistent location for all users. see at a glance which might be interes...

c - Is it a mistake to check a `HWND` against `INVALID_HANDLE_VALUE`? -

There was a small debate with me with a fellow programmer. He uses the following idiom in his code: HWWWWW = some function white writers a wando (); If (hWnd! = NULL & hWnd! = INVALID_HANDLE_VALUE) {// All good} Other {// error} I told him that in my opinion this is a wrong view, as There is nothing with the definition hwnd type INVALID_HANDLE_VALUE , but it is certain that this is a good code, because a valid handle is never equal to INVALID_HANDLE_VALUE Maybe So, is this acceptable and correct idiom? Comparing INVALID_HANDLE_VALUE against hwnd For this it is a mistake. However, it is not a mistake in practice that will harm you. Only hwnd is reserved as valid CreateWindowEx as NULL . Now, this is an implementation description that INVALID_HANDLE_VALUE can not be a valid HWND , but this is only the implementation details. The function that manages the window, CreateWindowEx , uses NULL to indicate the failure If you use your argument with your ...

jquery - ASP.NET MVC kendo grid -

I can directly model the grid when I pass directly to the model if I try to get Jason data I can not do it, I can not Here's my controller: Namespace MVC_Test1.Controllers {Public class student controller: controller {Private ContosoUniversityEntities DB = New ContosoUniversityEntities (); Public Performance Index () {db.Configuration.ProxyCreationEnabled = false; See Return (db.students.ToList ()); } Read public functions ([DataSourceRquoteState] DatasourceRequest Request) {Use (var Northwinds = New Consumers University) (IQueryable & lt; student & gt; Students = Northwind Student; Data source Resource result = students. TODataSourceResult (request); Return Jason (Result);}}}} If I have this grid works and shows all the items: @model MVC_Test1.Models.student @ {ViewBag. Title = "Index";} & lt; h2 & gt; Index & lt; / h2 & gt; @ * @ (HT ML.Cendo (.) Grid (model) .name ("grid") .datasource (datasource = & gt; datasource.j...

excel - How can I kill task manager processes through VBA code? -

I am trying to kill some processes through VBA. I have a proprietary object that connects to the market data bus. Through the retirement I call this object to the pub / everyone in the bus. However sometimes the connection drops and I have to kill the process through the task manager. Is there any way to kill any process through VBA? Thanks Try this code, Set as OSRR = GetObject ("VinamGMT:") as the Orange Dim CPRK object set in the form of Object Dim CPR cProc = oServ.ExecQuery ("Choose * from Win32_Process") for each OPOC XML in CPCC Rename EXEEL With this process you need to end in the line given below. Note: This case is sensitive if oppor .name = "excel .exe" was then used to display a message for pure testing using MSBBX "KEY". RetetCode = oProc.Terminate () End if Next

php - Getting a subset efficiently when non-seekable -

I have a fairly large array, which I have structured: I am trying to find a more efficient way A subset of this array / piece I am currently doing: $ valToken = $ attr size [$ array- & gt; Shape]; // 14 $ size name = []; Forex Currency ($ ARR AS $ Key => $ value) {if ($ valToken === $ value) {$ sizeNames [] = $ key; } If ($ valToken & lt; $ value) break; } However in my opinion, looping should not be answered because it is quite disabled although I have not, to ensure that I do not run a full loop, if less than $ value , however a clever, more efficient way of doing this with all array methods available in PHP should be there? Try: $ sizename = array_keys ($ attr size , $ Array- & gt; shape, true); Anyway: I structure the array like this: $ attrSizes = [0 = & gt; ['*' No,], 1 = & gt; ['Xs (101)', 'S (102)', 'M (103)', 'L (104)', 'XL (105)', 'XXL (106)', 'XXXL (107)' ,], 2 = ...

ios - Exec Bad Access on using MagicalRecord when saving objects -

Image
When I save the objects, I have to face a problem using the magical record. save reference using this: - (minus) saveContext {[NSManagedObjectContext defaultContext] saveToPersistentStorewithCompletion: ^ (BOOL success, NSError * error) {if (success) {NSLog (@ "You successfully saved your reference."); } And if (error) {NSLog (@ "Error saving reference:% @", error description); }}]; } For this reason crashes my app [EXC_BAD_ACCESS] on the [[self MR_defaultContext] mergeChangesFromContextDidSaveNotification: Information] ; I have used other methods: // index the correct order based on the order * orderToComplete = [self Vshuvistaranurupon: Suckankkpat .]; // set the order after completion [Magic recorded Sevvithblok: ^ (Ansmanedobjekttontekst * Sthaniycontekst) (Order * Local orders = [Order to Conteksः local Contaks] The compound [local order sets IS contained price: Yes];} Conclusion: ^ (the success of Bell, Ansiarar * error) {if (success) Anse...

What hex color code is "Google Plus Red"? -

Does anybody know what is the exact hexadecimal code for the red used in the Google Plus icon? Google's branding guidelines show that it is # dd4b39

angularjs - Capture the original value of an Angular model for in-place editing -

I have created a simple in-place editing solution for profile data in my app. The problem is, if a person Edits and modifies the text of that field, but due to the binding of the coonors, the change in text is still displayed in the UI to select "Cancel". I was thinking that when someone "edits the profile", then I capture the original value of the ground so that if it is canceled, then it can restore the original text . $ scope.editProfile = - & gt; $ Scope.editState = true $ scope.originalDescription = $ scope.user.profile.description Of course, something that does not work is $ scope.user.profile.description at that time I want to edit when the Edit profile file is called. Any suggestions for strategies here? what you can do, is this: angular copy ($ Scope.user.profile.description, $ scope.description.backup) and if you need to restore the original values: Angular.copy ($ scope.description.backup, $ scope.user.profile description) ...

Switching tabs JavaScript -

So it's hard to explain, but I will do my best I have added event listeners to my webpage, Will bring some pages with the key press and they will work just fine. I used this code: if (e.keycode === 65) window.location.replace ('http://exampleurl.com/example'); And it works just fine. I tried to open them with new tabs like this: if (e.keycode === 65) window.open ('http://exampleurl.com/example', ' _newtab '); And this is also perfectly fine now I feel that whenever you try to see any of the pages, it will definitely be annoying to open a new tab. I would like to make it where you have a tab already open in a tab, press the key to go to that page, just go to the tab where it will open. The closest I was able to do this was: if (e.keycode === 65) window.open ('http://exampleurl.com/example', '_newtab_home'); If (e.keycode === 66) window.open ('http://anotherexampleurl.com/example2', '_newtab_home'); And it ...

Defining Swift functions that operate on Types instead of values -

In Swift, ? takes the operator instead of the type as the parameter: var z = 42? // an alternate & lt; Int & gt; And var z will not compile: int? = 42 //? Takes int and an alternate & lt; Int & gt; How can I do my job, or the operators who work on type instead of values? What you want to achieve is not possible. Although there is a workaround: you can create a custom operator that is given a lexical or variable, converts it into optional Swift custom operators in ? does not allow the use of the character, I am selecting a random combination, but do not hesitate to use your own: Postfix Operator>! {} Postfix Funk & gt; & Lt; T & gt; (Value: T) - & gt; T? {Return value as T? } Once done, you can use it as follows (Production from Playground): 10> // {some 10} Test "& gt; // {some "test"}

How to read characters in a string in java -

I'm new to Java, so I'm sorry that this is a clear question. I am trying to read a string character with the character to create tree nodes. For example, input "HJIOADH" and nodes HJIOADH I have seen that char node = reader .next () charAt (0). I have four nodes = reader.next () I can get the first four hours by CharAt (1); Can I do this with the other Chart J? Can I use a circle to get all the characters? As n node = reader.ext () . Charite (i) I tried but it does not work. Scanner Reader = New Scanner (System.in); How can I do that? System.out.println ("input your nodes as capital letters without space and end in '/' '); int i = 0; char node = reader.nxt (). Charite (I); While (node! = '/') { CreateNode (node); // This is a function to create a tree node i ++; node = reader NXT (). Charite (I);} You can only next ( ) Once your reader, unless it is repeated repeatedly in it. string nodes = reader.a ...

sql - Operate on pseudocolumn in oracle -

I am creating two pseudocolumns that I want to work on (taking percentage difference in them), which is usually done Although with two numerical areas I am getting an error; ORA-00904: "pseudocolumn_B": invalid identifier My code: select DW.mykey, sum (Case when TODATE between 'ms.day_date' ('10 / 09/2014 ',' DD / MM / YYYY ') and TO_DATE ('07 / 10/2014', 'DD / MM / YYYY') then MSN Brace & End End) Pudocalcal_A, Amount (case when TODATE between ms.day_date ('03 / 08/2014 ',' DD / MM / YYYY ') and TO_DATE (' 09/09/2014 ',' DD / MM / YYYY ') then ms.numbers second 0 end) change_in_pseudo_columns as pseudocolumn_B (pseudocolumn_A - pseudocolumn_B) / pseudocolumn_B - this line is h He fails Table DW to Table 2 M.S. But ms.mykey = DW.mykey WHERE dw.some_field = 'some_value' by group DW.mykey by order DW.mykey I believe that I am capable of doing non-Oracle databases Do this first wi...

How to annotate Objective-C APIs for use in Swift (e.g. return types) -

According to the Xcode release notes, Apple has "auditioning" its existing API so that they can choose alternatives without interval. This means that T! Instead of , do their APIs T or T? Where appropriate, will come back. Where do they do this? How can I annotate / wrap my current purpose-c code (especially libraries) to use cleaner from swift? Xcode 6.3 / swift 1.2 Xcode 6.3 Objective- Added official support to Emptiness of value Price zero for the keyword __Table , __elected and __not_translated ( With the default) type can be declared by interpreting the type. The properties and methods include the keyword faucet , nonnull and null_unspecified . Examples from Xcode release notes - (empty) registerNib: (nonnull UINib *) cell resuentifier: (non-existent NSString *) identifier; - (nullable UITableViewCell *) cellForRowAtIndexPath: (nonnull NSIndexPath) index; @protecti (nanatomic, redrawite, raten, blank) uivuvee * background view; Change d...

ios - How to test if a variable is declared? -

I can test that an asset exists in this way: #import & Lt; Objc / runtime.h & gt; - (zero) testcachedPublicFeedExists {objc_property_t prop = class_getProperty ([store class], "cachedPublicFeed"); XCTAssertTrue (hop); } But how can I test if a class variable like cachedvar exists? @interfaceFTDataStoreBase: NSObject {NSMutableArray * cachedVar; } You can use these methods class_getInstanceVariable Or Class_getClassVariable . - (zero) testcachedVarExists {Ivar ivar = class_getInstanceVariable ([Store class], "CachedWire"); XCTAssertTrue (Ever); } Learn more.

vim - Detect which plugin automatically write the closing comment character just after I write the opening one -

I have installed the package with several plugins for testing when I type (or "or anything that If a comment looks like the beginning, then a plug-in connects the ending character) or ". How do I know which plugin is "criminal"? In general, what is the logical way to check such a category? spf-13 women "distribution" / Em> Lure you with quick install and out-of-box settings, but you pay with the complexity of the value (you must understand both the order of the VIM, the loading scheme and the uncontrolled conventions of distribution) and the flexibility (distribution Some things can be easy, but other things are very difficult). Vim is incredibly adaptable, using a customization of someone else does not make sense. It has been said, the functionality is one of the auto shutdown plugins that clearly ships with spf13 normally, if you need to find out who Some plug-ins are behind mapping, then the : verbose map command will tell you where ...

javascript - Generate zip of polymer app without all the non-production files -

If you install a polymer applications using arbor gives you a countless number of files that you do not need . Tags that are not being imported Most / bower_components / in README.md and documentation . DEMO files in the most / bower_components / It does not matter if you are running it on a http server, but if you It is important to bundle a packed application now, with this, vulcanize is possible all this html tag is inline, but in lieu of the file still the context like & lt; polymer-element [...] assetpath = "bower_components / core-icon /" & gt; In fact, this issue is not actually solved, I believe that I am facing only this problem, so am I doing something wrong or what? > You can use to generate your production code. I have attached a basic grunting configurations that will help you. The script assumes the following Grunt plugins: Content-Contrib-clean cunt-Kantrib-Const Grnt- CSSC purr-DOM-Munger matchdep For example grunt.j...