I have a table as low as
Barrier complaints Tim Slow John Waste Mike Dung Tim So Tim Charge Too Mike Lazy Make a table where the most complaints are ordered by the waiters, but the complaint also shows? Pre-Below
Barrier Complaints Tim Slow Tim Sleep Tim Charges Too Mike Lazy Mike Dung John Rudd Post-text "itemprop =" text ">
Just count the number of complaints per waiters and join your table:
select t1.waiter, t1.complaints table Select the waiter to join t1; (1) Calculate by the waiter as a table group by num_complaints (T1) = T. 2. At the T2. 2. NAM_complants day, T1witer, T1complants;
I have a web app that stores data using MySQL, the web app is internal (available through the internet is not).
I now have to deploy this application in 3 (and possibly more) locations (branch offices) They need to be able to sync the data (entries made at one place should be available at other branch locations).
Requirements
- Local examples of web app + mysql database
- Every location is read / written locally / on its own network < / Li>
- The database syncs one day (one possibly through a script via SSH) so that each location has the same data.
The only way I was able to understand it (to date) is to create a UUID (unique identifier) and with each source a source bit (for original position) and sync bit To encode with (new = 0, synchronized = 1) to write a script where I add SSH and rows to every location = that is my source and 0 = synced in every place ... I know it's cruel and not flown He is elegant / reliable but I am not sure what else to do.
The client feared that if the Internet connection fails, that app wants to be able to work locally, but between another branch (via a night script or otherwise ). As I said, there are already 3 locations in total and possibly coming later this year.
Any advice on architecture would be appreciated.
PS Because of security concerns I am not connecting the database to the Internet but all suggestions are open to the.
Thank you.
You are potentially spending the extra hardware, development, and with such an architectural decision Maintenance costs themselves a lot of money unless they have important data entry required of the mission, so it can be a very high expectation to replicate the hardware stack in all the branch locations.
It is being said, they still migrate from the open Internet server to the server, as long as they do not have their own VPN, within which you are setting it to migrate Trying to do some daily process of doing / merge data should be a red flag in your mind and should be a total non-starter. This is a very complex problem. You need a master-master database replication cluster that needs you. Fortunately MySQL offers you the ability to do this. Unknowingly, installing it and getting it right can be complicated, perhaps something that might be a challenge for you if you have to ask this question here.
As far as database security is concerned, there is no reason why you should be worried about being a hosted Internet MySQL database, as long as you are taking proper precautions to protect the server. This will probably start with the permission of the port-3306 (and 22 for SSH access) at the network level and only access to the IP address (SAS) of Web Application Server (S). It will include accepting traffic from only those specific known hosts to include MySQL user accounts from which you will access.
I have an assignment where I anticipate taking a stack, show the output and then reverse it to show the output.
Looks Like
Stack: 262 115 74 26 34 243 22 734 113 121 Stack Reversal: 121 113 734 22 243 34 26 74 115 262 Instead of my coming like this Stack: 262 115 74 26 34 243 22 734 113 121 121 113 734 22 243 34 26 74 115 262 Stack Inverted: Can anyone see my code and see what's going on. I have tried a lot, but nothing can be found to work #include & lt; Stdio.h & gt; # Include & lt; Iostream & gt; #include "linkedStack.h" using namespace std; Template & lt; Class type & gt; Zero Print Stacks (Linked Stack Type & Lt; Type & gt; Stack); Template & lt; Class type & gt; Zero Riversstakes (Linked Stack Type & Lt; Type & gt; Stack); Int main (int argc, char ** argv) {// declare stack variable linked stack type & lt; Int & gt; Pile; // Add some data to Stack Stack Peash (121); Stack.push (113); Stack.push (734); Stack.push (22); Stack.push (243); Stack.push (34); Stack.push (26); Stack.push (74); Stack.push (115); Stack.push (262); Cout & lt; & Lt; "Stack \ n \ n"; PrintStack (pile); ReverseStack (pile); Cout & lt; & Lt; "\ N Stack reversed: \ n"; PrintStack (pile); Cout & lt; & Lt; "\ N \ n ** Press any key to continue ** \ n"; Getchar (); Return 0; } Template & lt; Class type & gt; Zero print stock (linked stack type & lieutenant; type & gt; stack) {type item; LinkedStackType & LT; Type & gt; Tmpstack = stack; While (stack.isEmptyStack () == incorrect) {item = stack.top (); Stack.pop (); Cout & lt; & Lt; Item & lt; & Lt; ""; } Stack = tmpStack; } Template & lt; Class type & gt; Zero Riversstakes (Linked Stack Type & Lt; Type & gt; Stack) {Type Item; LinkedStackType & LT; Type & gt; TmpStack; While (stack.isEmptyStack () == incorrect) {item = stack.top (); Stack.pop (); TmpStack.push (item); } While (tmpstack.isEmptyStack () == incorrect) {item = tmpStack.top (); TmpStack.pop (); Stack.push (item); Cout & lt; & Lt; item; } Stack = tmpStack; Return; }
I'm not 100%, but I think if your code will work Riverstacks .
template & lt; Class type & gt; Delete the second loop of Zero Riversstakes (Linked Stack Type & Lt; Type & gt; Stack) {Type Item; LinkedStackType & LT; Type & gt; TmpStack; While (stack.isEmptyStack () == incorrect) {item = stack.top (); Stack.pop (); TmpStack.push (item); } // while (tmpStack.isEmptyStack () == incorrect) // {// item = tmpStack.top (); // tmpstack.pop (); // stack.push (item); // cout & lt; & Lt; item; //} stack = tmpStack; Return; }
I have a database table that describes a job that is processing on a distributed system. Therefore, the whole work is divided into several small parts and each part is processed on a different machine in its own environment.
I want to keep a simple log of how each process is displayed, so each node is connecting with SQLAlchemy to the same work table and its job number till the end of a Unicode text field And adds the situation. >
I hope to see something like this:
Part 1: Completed & lt; Br / & gt; Part 2: Completed & lt; Br / & gt; Part 3: Error & lt; Br / & gt; Part 4: Completed & lt; Br / & gt; ... etc. I'm just doing a code process.log + = "part 1: full \ n" on each node when it finishes processing Does. Then a session.commit ()
I know that part number will fall out of order and it is fine for my purposes, but what is happening instead That I am only getting some entries of the total parts; I think that is because many jobs are ending at the same time and appending + thread is not safe.
I am not good with the session, so I have all the tricks to configure it, I tried to use a NullPool without any profit.
Is there any way to secure the endand operation thread in such a distributed environment?
If you want to update one - I believe - text field in parallel < / Em> It is running internally: Each example reads the original field, the object takes care of immediately ( sessionmaker , hence an example of a data-holding unit for each thread) And adds its part to the version of its field. After this, their own incidents occur. What you get as a result - Completely Thread-Safe - Previous Edition Last Object Written Wins
If you want to all commit your data to the same area with the this data structure, then you have to throw a profit of threading , And synchronize instances of the organization to read and write, so that each thread can wait for the data to be read (for this) until its predecessor arrives.
You should do do this: to convert the advantages of a SQL database to usages in the data structure and each your SQL Update the record.
I have some elements on my webpage and I want to click on one of the elements when I click on it Is unchecked)
& Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "back" & gt; One class = "link" href = "# / portfolio / chicken.html" onclick = "gestionClic ('compteur11');" & Gt; & Lt; Div class = "element-image-back" & gt; & Lt; Div class = "element-image-back" & gt; & Lt; Img src = "./ Post thumbnail images / raspberrypyboard.jpg" /> gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Div> & Lt; / Div & gt;
When I click on an element, it is class = "link" which is clicked.
I tried to do this but it does not work:
$ ('.link'). Click (function () ($ ('. Element'). Sister () .animate ({session acety: 0.4}, 300); $ ('. Link') (function () {$ no ( 'Element'). Stop (). Animate ({obscurity: 1.0}, 300);});});
First: Clear your HTML elements!
Second: Work on my demo
$ ('. Element> img'). Click (function () {$ (this). ({Opacity: 0.4}) Brother Sister (). Chetan ({obscurity: 1});}); After clearing your HTML ...
& lt; Div class = "element" & gt; & Lt; Img src = "{SRC}" & gt; & Lt; Img src = "{SRC}" & gt; & Lt; / Div & gt; Then you can use
demo:
if you're actually your impure If you want to use HTML, just do this ...
$ ('Element img'). Find (". Element"). Find ("img"). (This) .mate ({opacity: 1}); $ (this) .met ({obscurity: 0.4});} ); Demo:
Example in your case:
< Code> $ ('. Element & gt; .back & gt; .link'). Click (function () {$ (this). Value ({opacity: 1}); $ (this) .parents (". Element") .find ("front."; Element-image-front "). ({Opacity: 0.3});}); One more click:
$ ('. Element & Gt; Forte & gt; .element-image-front ') .click (function () {$ (this) .animate ({opacity: 1}); $ (this) .parents (". Element"). ( ". Back> .link"). Animate ({obscurity: 0.3});}); Should be done in a function, but your HTML is unclear. Code 2 Function for% Work and 100% Full Focus Elements
Day Mo:
How do I add 1-pixel top-margin to the checkbox in DataGridCheckBoxColumn?
Any help in this regard will be greatly appreciated ....
You can try the following:
& lt; DataGrade ItemsSource = "{Binding}" & gt; & Lt; DataGrid.Columns & gt; & Lt; DataGridCheckBoxColumn Header = "Checkbox" & gt; & Lt; DataGridCheckBoxColumn.ElementStyle & gt; & Lt; Style & gt; & Lt; Setter Property = "Framework Element. Margin" Value = "0,1,0,0" /> & Lt; Setter Property = "Framework Element. Horizontal Alignment" value = "center" /> & Lt; / Style & gt; & Lt; /DataGridCheckBoxColumn.ElementStyle> & Lt; / DataGridCheckBoxColumn & gt; & Lt; /DataGrid.Columns> & Lt; / Data grid & gt; This works, and the exact checkbox gets the margin specified. See the article about ElementStyle property Also, if you enable editing in your DataGrid , you can change the application to apply the appropriate look.
I am learning elastic search and I have started a new project. Now I wonder where to add mapping etc., where should I add initial code etc. Do you create an external script that holds different curl commands and then runs on it, or for example Java project has a self package where your configuration code is and then when you need to run it for? Which approach is most suitable and why?
The mapping that I use the XContentBuilder
{"Tweets": {"Properties": {"message" "Type": "String", "Store": "Yes" , "Index": "analyzed", "value_value": "not"}}}}
Public void putMappingFromString (string index, string type, string mapping) {div class = "post-text" itemprop = "text"> indeseadmin client IACC = maltent (). Administrator () Index (); PutMappingRequestBuilder pmrb = New PutMappingRequestBuilder (iac); Pmrb.setIndices (index); Pmrb.setType (type); Pmrb.setSource (mapping); ListenableActionFuture & LT; PutMappingResponse & gt; Laf = pmrb.execute (); PutMappingResponse pmr = laf.actionGet (); Pmr.getAcknowledged (); }
You can obtain mapping for an index from the cluster state (indirectly):
public string mismapping (string index, string type ) Throws EsuException {ClusterState CS = getClient (). Administrator () Cluster () ReadyState () SetFilterIndices (index) .execute () ActionGet (). GetState (); Index metadata IMD = C Metadata (). Index (index); If (IMD == faucet) {new ESUIDXOntexExistException (index); } MappingMetaTata mmd = imd.mapping (type); If (mmd == tap) {new EsuTypeDoesNotExistException (index, type); } String mapping = ""; {Mapping = mmd.source (). Try the string (); } Hold (IOException e) {mapping = "{\" "+ e.toString () +" \ "}"; } Return mapping; } If you store your mapping as a resource on your class path, then it allows your mapping to be processed with your source code < / Div>
I am following this tutorial on how I have gone through the horizontal coordinate code and that's OK. What is my problem? I think that is my CSS, when you click on a tab, the animations are animated in the last panel, but the next panel is dropped and does not do the etmat, someone can show me what is wrong , Either in my CSS or JPER Please give me some help for this. Please here is mine. I do not know what exactly is the problem, but I run all my elements on the left.
PS 'visible' variable is the current content panel html:
CSS
.accordion {width: 460px; Height: 300px} .accordion .header {width: 40px; Height: 100%} .accordion .content {background: #dedede; Height: 100%} .accordion Title, accordion .content {float: left; Height: 100%; Clear: none} # Tab 1 {Background: # C90} # Tab 2 {Background: # C60} # Tab 3 {Background: # C30} # Tab 4 {Background: # C00} < P> jQuery: <(': last'), width (':' '' 'H3' ',' visible '). = Visible.outwidth (); Tab.next () Filter (': no (: last)'). CSS ({'display': 'none,' width ': 0}); Tab.click (function () {if (visible.prev () [0] == this) {return;} visible.animate ({width: 0}, {duration: rate}); visible = $ (this) Next (). Chetan ({'width': width}, {duration: rate});}; } Ardiion (350);
Sorry I do not have enough reputation to comment on this.
Did you compare your code with the linked source code in the comment of the tutorial video?
There are some important differences in your original post, the jacquery is different from your JSfield.
Your jazzery should look even more:
function erordian (rate) {var tab = $ ('.accordion'). ('Header'), visible = tab. New (). Filter (': the last'), width = visible.outerWidth (); Tab.next () Filter (': no (: last)'). CSS ({'display': 'none,' width ': 0}); Tab.click (function () {if (visible.prev () [0] == this) {return;} visible.animate ({width: 0}, {duration: rate}); visible = $ (this) Next (). Animate ({width: width}, {duration: rate});}); }; $ (Document) .ready (function () {accordion (350);});
I have a string dummyString that should be compared to 100. This is my code
dmestressing = [prefix objectfore: @ "display size"]; [Self set disassembly: dummy string]; NSLog (@ "Display Controller is Preparing to Set With Values% @", Dummy Strasting); NSLog (@ "1 tried"); If ([Dmestressing excel: @ "5"]) {NSLog (@ "Loaded Preferences, Short Display"); DisplayChanged.selectedSegment = 0;} NSLog (@ "Tride 2"); If ([Dmestressing Excel: @ "40"]) {NSLOG (@ "Loaded Preferences, Display Made!"); DisplayChanged.selectedSegment = 1;} NSLog (@ "Tride 3"); If ([Dmestressing avest toastring: @ "100"]) {NSLog (@ "Loaded Preferences, Display Large"); DisplayChanged.selectedSegment = 2;} NSLog (@ "display% controller is trying to meet with value% @", dummy strasting); CopyBot [1011: 303] is being prepared to set display controller with value controller 100
2013-03-26 17: 22 : 49.101 -03-26 17: 22: 49.102 Trying to copyboat [1011: 303] 1 2013-03-26 17: 22: 49.102 Copyboat tried [1011: 303] 2 2013-03-26 17: 22: 49.102 tried copyboat [1011: 303] 3 2013-03-26 17: 22: 49.103 copyboat [1011: 303] - [__ NSCFNumber is extolstration]: Unexpected selector sent for example 0x64c7 2013-03-26 17 : 22: 49.103 copybott [1011: 303] - [__NFFNumber avestoString:]: A For example, 0x64c7 sent to the familiar selector I have tried some variations to declare different stars, but it can never look like to enter an 'if' statement. Is any comparison for any comparison, is Aval or EqualToString any help is appreciated.
According to your error your dummyString is not NSSTING In fact it is NSNumber .
You compare your string with @ "5" to NSNumber and then compare:
BOOL equals = [dmestressing Excel Number: @ ([@ "5" Integer Value]]; or convert the dammestring value to a string and then compare:
BOOL equal = [NSString stringWithFormat: @ "% d", [dummyString IntegerValue]] is EqualToString: @ "5"];
I have under the default website has multiple web apps in IIS (WCF) services as long as they all have the same application pool they Running in a shared separate storage file can not use any problems.
However, once I tried to reach individual is incapable of separate applications to carry the I "System.IO.IsolatedStorage.IsolatedStorageException: Mutks pool" when someone went by another file they are running under the NetworkService user I GetUserStoreForAssembly and GetMachineStoreForAssembly could all do not use any idea why they file sharing tried with the same results?
I made sure that the closing of the currents and settling it is also holding someone in one case, but I am running a simple test where one service writes
apart from this , I'm reaching a separate store from a signed assembly.
Do anyone have any ideas?
Anyone have any ideas? p>
Here is the code: the
try Private Sub LoadData () Dim filename = FullFilePath (_fileName) dim isoStorage as IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForAssembly () ' GetMachineStoreForAssembly, the same failure isoStorage. CreateDirectory (ROOT_DIRECTORY) if (isoStorage.GetFileNames (filename) .Length = 0) then return end if not drift as stream = new IsolatedStorageFileStream (filename, FileMode.OpenOrCreate, isoStorage) Section isnot something then dim formatter IFormatter = try as new BinaryFormatter then () dim app data like Hastebl = Dayrektkast (Formetr. Dayrerialaijh (stream), Hastebl) Daym Anyumretr as I DictionaryEnumerator = appData.GetEnumerator () while EnumeratorkMoveNext () End my (enumerator.key) = enumerator.value Try person while finally StreamkClose () StreamkDispose () Section = some other end not end even open stream End Sub Public Sub Save () Dim filename = Puarnfailpath (_fileName) 'IsolatedStorage. Separate storage file as dim ISO file: separate storage file.NETUserStorForAsdampon () tried 'GetMachineStoreForAssembly', in the form of a similar failure stream, dim stream = new separate storagefilestream (file name, FileMode.Create, ISO file) if there is no stream then some defraterfirmer Try IFormatter = New BinaryFormatter () formatter.Serialize (Stream, Direct Sext (m, hashtable)) Finally stream. Close () Stream. Forbidden () stream = try nothing end if end sub
It seems that There was a trust issue.
GAC sets it as everything in Magical Gac to complete access to the separate storage file after adding assembly is fully trusted.
This works for me, but it can not always be an option to do so for other solutions. If so, then see the .NET Framework caspol utility.
Hope this helps anyone! It was a very large accessory.
I am writing a dos batch script file. My script will be doing the following:
- Make a directory with the mkdir command
- Divide a power shell command into a new window (not the same command window)
- I would like to open this power script in a new window
- Run Shell Monkey-P com.android.browser in the current window
test.bat
mkdir c: \ test_log_file powershell adb logcat & gt; & Gt; "C: \ Testdata.txt" shell monkey -P com.android.browser I have a problem creating a power in a new window how do I have a power shell in a new command window Will open
Regards,
mkdir c: \ test_log_file START "powerhail window "PowerHead ADB Lockacket ^ & gt; ^ & Gt; "C: \ Testdata.txt" shell monkey -P com.android.browser Duties ( ^ ) to avoid the command for your particular meaning The processor is essential. The first parameter quoted is the window title of the new window, if you wish, then " can be.
मैंने पाया कि IOS UIImage में CIImage को बदल सकते हैं। UIImage में एक संपत्ति CIImage है। और जब मैं UIImage का उपयोग करता हूँ, UIImage ऑब्जेक्ट रिक्त नहीं है, लेकिन UIImage.ciimage शून्य है, क्यों?
अगर कोई मेरी सहायता कर सकता है तो मुझे मेरी बेवकूफी के सवाल को माफ़ करो, बहुत बहुत धन्यवाद
ADD
उदाहरण के लिए, नीचे की तरह शून्य कोड:
UIImage * image = [UIImage imageNamed: @ "test जेपीजी "]; सीआईएमएज * सीआईआईजेज = इमेज। सीआईएमएज लेकिन अगर इस तरह से सीआईआईमेज रिक्त नहीं है:
UIImage * image = [UIImage imageNamed: @ "test जेपीजी "]; सीआईएमएज * आईआईमेज = [[सीआईएमएज एएलओओसी] इनिट वाईथ सीजीआईमेज: इमेज। सीजीआईमेज ऑप्शंसः नाइल];
यह इसलिए है क्योंकि यह UIImage वास्तव में एक सीआईएममेज नहीं है। दूसरे शब्दों में, UIImage का CIImage केवल तभी नहीं है यदि UIImage को पहले से ही सीआईएम द्वारा समर्थित किया गया है (जैसे कि imageWithCIImage: द्वारा उत्पन्न होता है)। आप इसका प्रयोग यूडीआईजेज को सीआईएममेज में बदलने के लिए नहीं कर सकते, क्योंकि आप ऐसा करने की उम्मीद करते हैं।
दस्तावेज़ीकरण वास्तव में इस पर बहुत स्पष्ट है। हमेशा पढ़ने योग्य है।
I have a table that has 3 miles of rows and when I use this query to select:
order_code, store_debit, where 4624603 TOTAL_PRICE order (ID, PID) and `status` = -6; or this question (using OR )
SELECT order_code, Store_debit, total_price command WHERE (id = 4624603 or pid = 4624603) and `position` = -6; And he has & gt; 17secs was but when I separate the two questions:
Where select order_code, store_debit, TOTAL_PRICE ordered id = 4624603 and `Status` = -6; and
select order_code, TOTAL_PRICE = 4624603 and `the store_debit, where PID command Status` = - 6; This Instant returns
Thank you all!
Update: The table indexes
cop_type payment_type, cod_type, cash_transfer, PID, position, normalized BTREE all_type payment_type Generic BTREE search_order_code order_code generic BTREE theodoi user_id, PID, payment_type, cash_transfer, status, report_atm, pay_status, normal BTREE item_lib item_id, status, pay_status, payment_type, generic BTREE search_phone generic BTREE search_order_email Email General BTREE order_work cod_id, status, district, payment_ Rkar, pay_status, cash_transfer, cod_type, free_ship general BTREE select_hot province, state, type, built, payment_type, pay_status, ITEM_ID general BTREE coupon_after_buy ID, PID, state, free_ship general BTREE search_ofice office, created, conditions, ship_status general BTREE SEARCH_ITEM ITEM_ID, Office of making, normal BTRI idx_ward_id ward_id general btri idx_street road_id normal btri idx_graphcode group code, with normal status ID General Bitiaar Aidiaks_pattaim Bhugtan_tim general Bitiarai Khoj_any PID, status, general Bitiarai Aidiakskountri_prkar country's typing General Bitiarai Aidiaks_buk_taim Buk_ time general Bitiari
How about using a union of the last two? Maybe / or maybe forcing a table scan.
I am working on an OpenCV program which is capable of detecting punches and categories of boxers. At the moment my program goes through all the different image processing, pulls the box containing the boxes on the ROI (regional interest), I get it and calculating these are some properties of each bounding box like area and center point
What I want to do now is to draw a line from each bounding box starting from the center point and analyze that line for its angle and length. Take a look at the image shown to my purpose:
So hopefully now you have a better observation ........
My question is here that I have such a line in the position of position in a vector How to attract from starting from the end to the end? To analyze this ...?
I did some research on several functions, which draw a line, but none of them seems appropriate for my purpose. Here are some research links:
Apart from this, the arc length, fittlines, clip lines and also seen; Half Transformation
Does anyone tell me which technology best fit my purpose ...?
Hopefully my problem is now well understood
An array Store the frame-by-frame of the tracked object in, store the centroid conditions, then feed it to the polylines () function.
I have to work with a given class "QueryGenerator" that matches the dynamic queries And by using string connection and provider, the column by the user anyway, I do not need to know the implementation of the class, but I have to use it and I'm in stock.
Finally, "query generator" returns the result of query as an object, the only thing I know (because I use the reflector on the square) Here is an example that I can put an IQueryable on that query result:
var result = (IQueryable) myQueryGenerator.Result; To know the contents of and results , I have to use reflection.
So, is there a better way to know the contents of the results , and, for example, fill a dataset with it?
No, no.
IQueryable can return different types of objects (for example, if you query against an array of objects) in this extreme case you will need to determine the type of each individual item in the enumerated query .
Example code to display this scenario:
object [] Objs = new object [3] {"string", 78, datetime.now}; Var q = objs.AsQueryable (). Skip (1) Take (2); Forresh (Y in OQ) {var t = o.GetType (); }
यहां मेरा एम्बेड कोड है:
& lt; embed width = "576" height = "432" फ्लैशवार्स = "& amp; amp = file = kgalive & amp; amp; streamer = rtmp: //5.77.33.107/kga" wmode = "अपारदर्शी" अनुमतिप्रमाण = "हमेशा" अनुमतिप्राप्त स्क्रीन = "सही" गुणवत्ता = "उच्च" नाम = "खिलाड़ी" आईडी = "खिलाड़ी" शैली = "" src = "खिलाड़ी.swf" स्वतः = "हमेशा" प्रकार = "एप्लिकेशन / एक्स-शॉक-वी-फ्लैश" / & gt; यह काम करता है, लेकिन वेबपेज खोलते समय मेरा खिलाड़ी स्वचालित रूप से शुरू नहीं करेगा अपने खिलाड़ी को स्वचालित रूप से शुरू करने के लिए मुझे क्या करना चाहिए?
असल में:
& Lt; एम्बेड चौड़ाई = "576" height = "432" flashvars = "& amp; amp; फाइल = किलाइव और amp; amp; streamer = rtmp: //5.77.33.107/kga" wmode = "अपारदर्शी" अनुमति प्राप्त करें = "हमेशा" स्वीकार्यप्रक्रिया = "वास्तविक" गुणवत्ता = "उच्च" नाम = "खिलाड़ी" id = "खिलाड़ी" शैली = "" src = "खिलाड़ी.swf" autostart = "always" type = "application / x-shockwave-flash" / & gt; की आवश्यकता है:
& lt; एम्बेड चौड़ाई = "576" ऊंचाई = "432" flashvars = "& amp; autostart = सच & amp; amp; ; File = kgalive & amp; amp; streamer = rtmp: //5.77.33.107/kga "wmode =" अपारदर्शी "अनुमतिबद्धता =" हमेशा "अनुमतिप्राप्त स्क्रीन =" सही "गुणवत्ता =" उच्च "नाम =" खिलाड़ी "id =" खिलाड़ी "शैली = "" Src = "खिलाड़ी.swf" autostart = "हमेशा" प्रकार = "एप्लिकेशन / एक्स-शॉक-वी-फ्लैश" / & gt;
Q1) यह देखते हुए कि हमारे पास
typedef डबल (* function_t) (डबल);
या
typedef std :: function & lt; डबल (डबल) & gt; Function_t;
हम कैसे परिभाषित करते हैं
std :: shared_ptr & lt; function_t & gt; Ptr_func = ???
कुछ फ़ंक्शन के लिए। मान लें कि हम एक वस्तु को shared_ptr चाहते हैं, जिसे पहले से परिभाषित किया गया है (अब के लिए भूलना यह उद्देश्य को हरा देता है - लेकिन मुझे इसकी आवश्यकता है)। एक उदाहरण के रूप में डबल ।
struct null_deleter {void operator () (शून्य const *) const {} के प्रकार के लिए निम्नलिखित पर विचार करें; }; Int main () {// परिभाषित वस्तु डबल बी = 0; // परिभाषित साझा सूचक std :: shared_ptr & lt; डबल & gt; ptr_store; ptr_store.reset (एंड बी, null_deleter ()); // यह काम करता है और आप की अपेक्षा कैसे करते हैं) यद्यपि हम shared_ptr प्रकार function_t के लिए ऐसा करते हैं, अर्थात
डबल एफ (डबल एक्स) {// some_function + return} int main () {// परिभाषित साझा सूचक std :: shared_ptr & lt; function_t & gt; ptr_store; ptr_store.reset (& amp; च, null_deleter ()); // त्रुटि: काम नहीं करता है} लौटाया त्रुटि निम्न जैसा है:
त्रुटि: 'डबल' (*) (डबल) 'से' डबल (**) (डबल) 'आरम्भिकरण में या std :: function
त्रुटि: 'डबल (*) (डबल)' से 'std :: function & lt; डबल (डबल) & gt; *' initialization में परिवर्तित नहीं किया जा सकता यह स्पष्ट नहीं है कि सही प्रकार पारित किया गया है , और शायद हमें ऐसा करने की अनुमति नहीं है (?)
नोट: जी ++ 4-7-2 संस्करण -std = c ++ के साथ संकलित 11-ओ 3 विंडोज़ मिनजीड पर
कुछ जवाब अच्छी तरह से काम करते हैं, मैं आज कुछ समय के लिए आपको उत्तर दूंगा। यह सुबह 6.30 बजे है और मैं अभी तक सो नहीं पाया। मैं जो लागू कर रहा हूं, उसके लिए मेरा पूरा डिज़ाइन पैटर्न शायद गलत है, उम्मीद है कि मैं थोड़ी देर बाद समझा सकता हूं। पाठ ">
यह अनुक्रमित है, परन्तु सबसे अच्छा यह है कि मैं समझ नहीं पाया कि वास्तव में आप वास्तव में क्या करने की कोशिश कर रहे हैं:
#include & lt; iostream & gt; Typedef std :: समारोह & lt; डबल (डबल) & gt; function_t; डबल एफ (डबल टी) {रिटर्न टी * 5; } Int main (int argc, char * argv []) {// आप आमतौर पर साझा सूचक को गतिशील रूप से आवंटित वस्तु std :: shared_ptr & lt; function_t & gt; से जोड़ना चाहते हैं। ptr; Ptr.reset (नया function_t (std :: bind (& amp; एफ, std :: प्लेसहोल्डर्स :: _ 1))); Std :: cout & lt; & lt; (* Ptr) (5.0); // लेकिन हम स्मार्ट पॉइंटर को स्टैक (बैड आईडीईए) function_t fff = std :: bind (& amp; एफ, std :: placeholders :: _ 1) पर एक स्थानीय फंक्शन ऑब्जेक्ट में संलग्न कर सकते हैं; ptr.reset (& amp; FFF); Std :: cout & lt; & lt; (* Ptr) (5.0); }
I have been working with creating a simple CRUD app using the up stack.
However, with me lack of knowledge can be prevented from doing things in an easy fashion.
My main concern with the update is that I have an object that is loaded from the database. The fields need to be mapped in one form, and when the contents of the form are modified and saved, then the database should be updated.
I found it very easy to render, and dynamically populated using ZE, however, on the way back, I used jQuery to rebuild my "manually" object. I am sending a Strataced JSON presentation of the form; Before storing it back into the database.
Is there an automatic device that mapped it for me? Looking at a JSON object and a form, it will handle the population and save the information back in the model.
For reference, I'm coming from a SpringMVC + hibernate background.
The tutorial for the tutorial or even a simple example would be OK. thank you in advanced!
Like others, I would definitely recommend it to help me when I try to learn the same stack was doing. On the server you can have something like this:
// defined schema var userSchema = mongoose.Schema ({name: 'string', Description: 'string', email: 'string', Date: {type: date, default: date, now},}); // Instant DB model var user = mongos Model ('user', user schema); // Post client export from Adds json from client post in addUser = function (req, res) {// req.body / unless that json field name is similar to schema field name, this data will automatically map new user = new user (req. Body); New user.save (error) {if (err) {return res.json ({error: "Error saving new user"});} else {console.log ("Success in adding a new user"); Res.json new user); }}); }; // PUT from client export Updduser = function (req, body) {// updated user json var updatedUser = req.body; // Here we can see that user by email field User.findOne ({'email': updatedUser.email}, function (mistake, user) {if (err) {return res.json ("error:" user Error in fetching "});} Else {//. We successfully found a user in the database, Update individual fields: user.name = updatedUser.name; user.save (function (err) {if (err) {return res.json ({Error: "Error updating user"});} other {console.log ("success in updating user"); res.json (updatedUser);}})}}}); }; Edit * Apparently, Mongoose actually has a search and update method that essentially does the same thing as I wrote above to update a model. You can read about it
मैं ActionBar में homeAsUpIndicator आइकन को बदलने का प्रयास करता हूं। मैं पुराने कोडों के साथ संगत होने के लिए ActionBarSherlock का उपयोग करता हूं। मैं अपनी गतिविधि के लिए एक विशिष्ट विषय सेट करता हूं, जब ऐप एक डिवाइस पर आईसीएस और आईसीएस के पुराने संस्करणों के साथ चलता है, तो यह अलग-अलग रंग दिखाता है।
यह वह शैली है जो मैं
& Lt; शैली का नाम = "थीम। पीएम" अभिभावक = "@ शैली / थीम। शारलॉक। प्रकाश" & gt; & Lt; आइटम का नाम = "android: homeAsUpIndicator" & gt; @ ड्रॉएबल / बैक_साइन & lt; / item & gt; & Lt; आइटम का नाम = "होमएएसअप इंडिकेटर" & gt; @ ड्रॉएबल / बैक_साइन & lt; / आइटम & gt; & Lt; / शैली & gt; आईसीएस के लिए इस तरह की छवि के नीचे देखें कि घर ऊपर के संकेतक काले रंग की तरह दिखते हैं।
आईसीएस के पुराने संस्करणों के लिए देखें कि घर में ऊपर सूचक सफेद रंग की तरह दिखता है।
मैं दोनों संस्करणों के लिए एक ही छवि का उपयोग कर रहा हूं, लेकिन यह आईसीएस पर अलग दिख रहा है। कैसे इस समस्या को हल करने के लिए ..
& lt;? Xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & Lt; संसाधन xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" & gt; & Lt; शैली नाम = "कस्टम स्टाइल अप एहोम" पेरेंट = "थीम। शारलॉक.लाइट" & gt; & Lt; आइटम का नाम = "एंड्रॉइड: एक्शनबारस्टाइल" & gt; @ शैली / कस्टमएक्शनबारअपएम्सहोटल & lt; / item & gt; & Lt; आइटम का नाम = "android: homeAsUpIndicator" & gt; @ ड्रॉएबल / एरो_होम & lt; / item & gt; & Lt; आइटम का नाम = "होमएएसअप इंडिकेटर" & gt; @ ड्रॉएबल / एरो_होम & lt; / item & gt; & Lt; / शैली & gt; & Lt; शैली नाम = "CustomActionBarUpAsHome" parent = "CustomActionBar" & gt; & Lt; आइटम का नाम = "एंड्रॉइड: डिस्प्ले ऑप्शन" & gt; घरएप | उपयोगो लोगो | शोहोम & lt; / item & gt; & Lt; आइटम का नाम = "डिस्प्ले ऑप्शन" & gt; घरएप | उपयोगओलोोगो | शोहोम & lt; / item & gt; & Lt; / शैली & gt; & Lt; / संसाधन & gt; & Lt; गतिविधि एंड्रॉइड: name = "। Activity.Activity" एंड्रॉइड: स्क्रीनऑरियेंटेशन = "पोर्ट्रेट" एंड्रॉइड: थीम = "@ शैली / कस्टमस्टाइलउपआहेहोम" & gt; & Lt; / गतिविधि & gt; यह कोड महान काम करता है। ऐसा कुछ करने की कोशिश करो हो सकता है कि यह आपकी सहायता करेगा।
शुभकामनाएँ!
I get this warning after starting the Android emulator:
emulator: Warning: could not: Start OpenGlass emulation using the software renderer WglGetExtensionsStringARB can not be found Could not get wglGetExtensionsStringARB wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB emulator: The emulator window was out of view and was recently
Even after the keyboard is displayed without the adapter emulator, I select both the checkbox "Hardware keyboard present" and "Display a skin with hardware control"
View this path C: \ user \ username Android \ avd ** Edit this file ** Emulator-user & amp; Set window.x = 0 window.y = 0 This works for me.
<कोड> वर्ग पोषक तत्व (models.Model): टैगनाम = models.CharField (MAX_LENGTH = 10) वर्ग FoodNutrientAmount (मॉडल। मॉडल): पोषक तत्व = models.ForeignKey (पोषक तत्व) खाद्य = models.ForeignKey (खाद्य) राशि = models.FloatField () वर्ग खाद्य (models.Model): पोषक तत्वों = models.ManyToManyField (पोषक तत्व, = FoodNutrientAmount के माध्यम से,) तो, मैं फूड्स की राशि द्वारा आदेश दिया प्राप्त कर सकते हैं टैगनाम = FOL एक सूची समझ के साथ पोषक तत्व:
ordered_fnas = FoodNutrientAmount। objects.filter (nutrient__tagname = "FOL") .order_by ( '- राशि') ordered_foods_by_most_fol = [ordered_fnas में फना के लिए fna.food] मैं मिल सकता है इस तरह के बिना एक क्वेरीसमूह के रूप में एक iterable पूरी बात को स्मृति में ले जा रहे हैं?
शायद food.objects.anotate या अतिरिक्त का उपयोग कर एक अलग दृष्टिकोण है? मैं इस समय ऐसा करने का एक शानदार तरीका नहीं सोच सकता।
मैं values_list के साथ मिल सकता हूं; लेकिन, मैं पीकेएस का आदेश दिया सूची और नहीं खाद्य वस्तुओं है कि मैं चाहता हूँ। के क्वेरीसमूह मिल
FoodNutrientAmount.objects.filter (nutrient__tagname = 'FOL')। ऑर्डर-बी ('- राशि')। VÃÆ'à एक € ™ ÃÆ'à ¢ एक, ¬ Å ¡Ãƒâ € SA, एक · alues_list ('भोजन', फ्लैट = सच)
संपादित करें:
यह कई-से-कई रिश्ते हैं तो आप संभवतः इसका लाभ उठा सकते हैं कैसे के बारे में FoodNutrientAmount के लिए डिफ़ॉल्ट अनुक्रम जोड़ने और फिर आप बस सामान्य manytomany प्रश्नों कर सकते हैं
वर्ग FoodNutrientAmount (models.Model):। पोषक तत्व = models.ForeignKey (पोषक तत्व) भोजन = मॉडल। विदेशी (भोजन) राशि = मॉडल। फ्लोटफ़िल्ड () वर्ग मेटा: ऑर्डरिंग = ('-एमएमटी',)