Sunday 15 May 2011

asp.net mvc 3 - Make change to a .cshtml file on Windows Azure Cloud Service -


We have a custom CMS site in which the administrator can make changes to _Layout.cshtml (since they are making many changes ). The site was hosted in Azure Web sites, but now we are taking it to cloud services

Now, the admin panel is reading and showing the contents of _Layout.cshtml (in fact, ~ / All files in the view / shared folder can be edited), but when the app is attempting to write to a file, it throws this error: Path 'F: SitesOutViewshaw Shared_Layout. Access to 'CSSM' is prohibited.

We are working on new ways to edit layout files, but before reaching there, we need a quick fix! I am using this method to write in the file: System.IO.File.WriteAllText (path, file resource);

Locally, in windows blue emulator, it is working correctly, but when it is hosted blue.

Thank you!

First of all, I have to say some problems even if you have your _Layout.cshtml can update the file

  1. If there are multiple instances of your web roll, once the administrator has changed the page, this only updates the file in the same instance , But others will not be changed by default. You have to somehow sync them.

  2. If your frequency has been moved to another virtual machine, for some reasons such as hardware failure or virtual machine processing, the allocation made by your administrator will be lost.

    That is why I strongly recommend amendment in your implementation about how to save the change part in the BLOB, table or database, then when the page was provided, you Retrieve content from DB. I think it would be better than just modifying the page.

    HTH

mysql - PHP Stored Procedure error when calling sequentially or more than once -


itemprop = "text">

I have two menus that use stored procedure Let us name it menu 1 and menu 2. This code is for Menu 1: This is a code for Menu 2 too.

  & lt; Php $ sql = $ mysqli- & gt; Query ("Call Selection Products ()"); $ I = 1; While ($ row = mysqli_fetch_array ($ sql)) {$ id = $ line ['prodid']; $ Date = $ line ['ProdName']; $ Items = $ line ['proddescription']; $ Qtyleft = $ line ['prodsupplier']; $ Qty_sold = $ line ['proddate']; $ Cost = $ line ['prodprice']; $ Sales = $ line ['prodquantity']; If ($ i% 2) {? & Gt; & Lt; Tr id = "& lt ;? php ek $ id ;? gt;" Class = "edit_tr" & gt; & Lt ;? Php} and {? & Gt; & Lt; Tr id = "& lt ;? php ek $ id ;? gt;" Bgcolor = "# f2f2f2" class = "edit_tr" & gt; & Lt ;? Php}? & Gt; & Lt; Td class = "edit_td" & gt; & Lt; Span class = "text" & gt; & Lt ;? Php echo $ date; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span class = "text" & gt; & Lt ;? Php ek $ item; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span class = "text" & gt; & Lt ;? Php echo $ qtyleft; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span id = "last_ <" php echo $ id;? & Gt; " Class = "text" & gt; & Lt ;? Php echo $ qty_sold; ? & Gt; & Lt; / Span & gt; & Lt; Input type = "text" value = "& lt ;? php echo $ rtrt ;? & gt;" Class = "editbox" id = "last_input_ <" php echo $ id;? & Gt; " /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span id = "first_ & lt ;? php echo $ id ;? & gt;" Class = "text" & gt; & Lt ;? Php echo $ value; ? & Gt; & Lt; / Span & gt; & Lt; Input type = "text" value = "& lt ;? php echo $ price ;? & gt;" Class = "editbox" id = "first_input_ <" php echo $ id;? & Gt; " / & Gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span class = "text" & gt; & Lt ;? Email Php $ dailysales; ? & Gt; & Lt ;? Php $ sales; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;? Php $ i ++; }? & Gt;   

My problem occurs when I call the stored procedure in Menu1 , but there is an error in Menu2

Depending on my research, this code may be an error because I am calling the stored procedure sequentially.

This code will be used to call the stored procedure a second time How to modify? I'm really confused with this one. It seems that the first stored procedure needs to be stopped, before I can call the stored procedure again. I really do not know how to do this.

I'm guessing that you get "out of sync" error?

Before you can make a second call to the database on the same connection, you will need to release the resources by calling Closed () on your results set. Since you named your result variable $ sql , call you $ sql-> close () .

For example:

  & lt ;? Php if ($ result = $ mysqli- & gt; query ("call selectproducts ()")) {$ i = 1; While ($ row = mysqli_fetch_array ($ result)) {$ id = $ row ['prodid']; $ Date = $ row ['prodname']; $ Items = $ line ['proddescription']; $ Qtyleft = $ line ['prodsupplier']; $ Qty_sold = $ line ['prod']; $ Value = $ line ['prodprice']; $ Sales = $ line ['prodquantity']; If ($ i% 2) {? & Gt; & Lt; Tr id = "& lt ;? php ek $ id ;? gt;" Class = "edit_tr" & gt; & Lt ;? Php} and {? & Gt; & Lt; Tr id = "& lt ;? php ek $ id ;? gt;" Bgcolor = "# f2f2f2" class = "edit_tr" & gt; & Lt ;? Php}? & Gt; & Lt; Td class = "edit_td" & gt; & Lt; Span class = "text" & gt; & Lt ;? Php echo $ date; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; Td> & Lt; Span class = "text" & gt; & Lt ;? Php echo $ item; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; Td> & Lt; Span class = "text" & gt; & Lt ;? Php echo $ qtyleft; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span id = "last_ <" php echo $ id;? & Gt; " Class = "text" & gt; & Lt ;? Php echo $ qty_sold; ? & Gt; & Lt; / Span & gt; & Lt; Input type = "text" value = "& lt ;? php echo $ rtrt ;? & gt;" Class = "editbox" id = "last_input_ <" php echo $ id;? & Gt; " /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span id = "first_ & lt ;? php echo $ id ;? & gt;" Class = "text" & gt; & Lt ;? Php echo $ value; ? & Gt; & Lt; / Span & gt; & Lt; Input type = "text" value = "& lt ;? php echo $ price ;? & gt;" Class = "editbox" id = "first_input_ <" php echo $ id;? & Gt; " / & Gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Span class = "text" & gt; & Lt ;? Email Php $ dailysales; ? & Gt; & Lt ;? Php $ sales; ? & Gt; & Lt; / Span & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;? Php $ i ++; } $ Result-> Close (); }? & Gt;    

exchange server 2010 - Powershell - Export Mailbox Information -


Text after "itemprop =" text ">

Then I have the following script - Go to MailboxStatistics from which I go information export both get-mailbox information, and as I understand They handle different aspects of both mailboxes about which we can export information

  gate-mailboxes-server server 01 -use unlimited size. Where {$ _. UseDatabaseQuotaDefaults -q $ false} | Foot DisplayName, IssueWarningQuota, ProhibitSendQuota, @ {label = "TotalItemSize (MB)."; Issue = {(Get-MailboxStatistics $ _) TotalItemSize.Value.ToMB ()}}   

Issue 1: Does not find any information in the TotalItemSize field when I run the script Problem 2: If I add i export-csv c:!? I get garbage

any ideas

You are taking garbage on export-CSV because you are trying to export format-table data that table of the format for the selection-item business will do better

  $ MBXs = get -Mailbox -Server Server01 -ResultSize Unlimited | where {. $ _UseDatabaseQuotaDefaults -eq $ false} & amp; {Foreach ($ MBXs in $ MBX) {$ MBX | Select DisplayName, IssueWarningQuota, ProhibitSendQuota, @ {label = "TotalItemSize (MB)", expression = {(Get-MailboxStatistics $ MBX) .otalItemSize.Value.ToMB ()}}}} | Export CSV mbxquotas.csv    

php - Problems using in_array and date in if/else -


I am using PHP functions and experiments.

I personally do not understand that my code is refunding the second part of the statement. If is returning the date ('D') Tue , why does not he run that part?

  & lt; Php date_default_timezone_set ('UTC'); $ Weekdays = array ("Mon", "Mars", "Mercury", "Thunder", "Venus", "Saturn", "Sun"); $ Today = Date ('D'); If (in_array ("Mon", "Mars", "Mercury", "Thunder", "Venus", $ Weekdays) == $ Today) {Echo "This is" ""; Echo today $; Echo "" "Get out of bed and go to work"; } Else {dungo "do whatever you want"; Echo today $; }; ? & Gt;   

I have tried many things and changed if to it, but there is no benefit.

  if someone can tell me what is wrong with syntax?   

< Div class = "post-text" itemprop = "text">

in_release function.

If you want to know if $ today There is a weekday, you want to do something like this:

  $ weekdays = array ("Mon", "Mars", "Mercury", "Thunder", "Venus"); If (in_array ($ Today, $ Weekdays)) {...}    

plugins - CAKEPHP - how to leave the plug in url -


I have an ACL plugin, and I want to be able to redirect the users / index back to this plug-in. But I'm getting a weird url that does not exist. Such as / cakephp / admin / acl / users / index

how can i do this on cakephp / users / index I can go through the HTML helper and I'm stumped.

I will be equally

thanks

When creating a link, you can reset the plugin by setting it to 'false';

For example;

  $$ echo-> HTML-> Link (Go to 'User overview', Arrays ('Controller' = & gt; 'User', 'Action' => gt; Index ',' Plugin '= & gt; False);   

Update

My guess is that both you prefix routing and an plug in both plug-ins and To reset the prefix, do this;

  copy $ the-> HTML- & gt; link ('Go to user overview' array ('Admin' = & gt; 'User', 'action' => gt; 'index', 'plugin' = & gt; false, // sets again Plugin 'admin' = & gt; wrong, // resets administrator prefix);    

servicestack - Sending a GET request to the path given in the route -


I am trying to call a RES service with a URL like this:

  example   

I have defined the request and response DTO. [Route ("/ account / {username}", "received")] Public class AccountRequest: Irene

Service calling:

  JsonServiceClient client = new JsonServiceClient ("http://example.org"); AccountRequest Request = New AccountRequest {UserName = "me"}; AccountResponse response = client.Get (request);   

However, when I call on the client, it does not respect the route. When I check in the cloud example debugger, AsyncOneWayBaseUri value is example.org/json/ asynconeway / . This part is irrelevant because it does not mean that the request has been sent to this URL. I do not really know where to send this request. I have not received any error and all my items are zero in the response object.

What am I missing here?

To call third party REST / HTTP Apis, you can use that service to Stack.Text, which can be accessed by normal data access To provide a brief, readable, pleasant API for NET Patterns around HttpWebRequest , such as:

  list & gt; GithubRepo & gt; Repos = "https://api.github.com/users/{0} /repos".fmt(user) .GetJsonFromUrl () .FromJson & lt; list & gt; GithubRepo & gt; & gt; ();   

Service # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # P #
  account request request = new account request {}  extension method (that service customer USS) directly (like without service call)  TRequest.ToUrl (method) Username = "me"}; Request.ToUrl ("GET") print (). //   

The same auto-generated route was used when I tried to call it through the JsonServiceClient , e.g.

  var clients = new JsonServiceClient ("http://example.org"); Var response = client.Get (request); // Call http://example.org/account/me   

Route URL to be used in service stack service customers

Service stacks are the most suitable route Trying to use the match DTO and HTP method with the value of the people you are calling with, if no mail is found, then it will fallback.

By default, the default predefined routes will be used:

 / api / [xml | Json | Html | Jsv Csv] / [syncreply | Asynconeway] / [servicename]   

But the service stack still supports / Reply and / oneway For example:

  / api / [xml | Json | Html | Jsv Csv] / [Answer | Care] / [Servicename]   

By setting the flag you can opt-in to use in customers:

  client.UseNewPredefinedRoutes = true;    

PHP: In forEach, stopping execution when a condition is reached, but continuing later -


After

Suppose i have something like this:

  $ count = 0; {$ CourseDetails as $ course_line} from {print} to & lt; foreach ($ course_line); TR & gt; & lt; TD & gt; {$ course_line ['class_code']} & lt; / td & gt; & lt; td & Gt; {$ course_line ['CLASS_NAME']} & lt; / TD> gt; & lt; td & gt; {$ course_line ['class_unit']} & lt; / td> & lt; td & gt; {$ Course_line ['class_description']}  gt; & lt; td & gt; {$ course_line ['class_instructors']} & lt; / td & gt; "; $ Count = $ count + 1 if ($ count = 10); $ Count = 0; // code which prevents script and "continue"? If the button pops up on the web page under the already outputed description // Press "Continue?" Button, to continue the script (jump back into the foreach loop)}   

I stopped trying to script and then finding a way to make a button Am "Continue?". If the customer presses the button, then I want to continue the script where it was left. Is there any work in PHP that allow this?

Short answer: No!

This is a workflow design issue, I would recommend to create a list of items to execute. Then to execute them (as they are successfully processed, marked them full), if any error is hit, then stop the execution and try the user's address. If the user wants to continue, then reload the page, and continue to execute those items which have not been completed from your initial list.

php - How to get the sum of data from a table without making multiple queries? -


मैं वर्तमान में इस क्वेरी को चला रहा हूं:

  SELECT *, COUNT (name) AS ActionCount से खेल के नाम से ग्रुप नाम के आदेश में एक्शनकॉउंट डीईएससी सीरियस 0, 50   

मेरे खेल में सबसे प्रमुख / आम नामों का चयन करने के लिए, मैं कैसे मिलेगा कुल लाभ का प्रत्येक राशि खिलाड़ी ने प्रत्येक गेम में 'माइलेज' फ़ील्ड संभालने से ऊपर चुने गए 50 उपयोगकर्ताों में से हर एक के लिए कोई क्वेरी न चलाए।

मुझे उम्मीद थी कि:

  SELECT *, COUNT (नाम) AS ActionCount, SUM (माइलेज) कुल के रूप में कुल मिलाकर समूह द्वारा नाम से आदेश ActionCount DESC LIMIT 0 , 50   

ऐसा करना होगा।

यह मुझे विशेष रूप से मुश्किल नहीं लगता?

java - Client reading too many bytes from server? -


I am writing a simple FTP client / server setup; the client should be able to get the file from the server and the result is bytes Place in the form of / retr_files / filex. Proper responses are sent to the server, and file 1 is actually created in the folder. However, many bytes were sent (or were received) I tested it on 9.6 KB file and the file was client-side 16.6kB. strange. I think I am clarifying something here, can someone help me? Thanks!

Relevant code:

Customer:

  BufferedReader inFromServer_d = null; If (welcomeSocket! = Null) {if (WelcomeSocket.isClosed ()) {welcomeSocket.close (); }} Try {WelcomeSocket = new ServerSocket (Port); System.out.print ("PORT" + myIP + "," + num1 + "," + num2 + "\ r \ n"); Out.Litebites ("port" + mip + "," + number 1 + "," + num2 + "\ r \ n"); System.out.print (parseReply (GetResponse ())); System.out.print ("RETR" + pathname + "\ r \ n"); Out.Litebites ("RETR" + PATNAM + "\ r \ n"); String Answer = Pars Repli (getResponse ()); If (Answer: Chart (10) == '1') {System.out.print (Answer); System.out.print (parseReply (GetResponse ())); Try {ClientSocket_d = welcomeSocket.accept (); } Hold (IOException e) {System.out.print ("GET failed, FTP-data port not allocated. \ R \ n"); System.exit (-1); } InFromServer_d = New BufferedReader (New InputStreamReader (clientSocket_d.getInputStream ())); // READ Bufford Reader bufffered reader = infraversver_d; Fiver output = new flamer ("retr_file / file" + retort cnt); Buffer water buffer = new buffed vaitters (output); string length; While ((= width = buffed reader.readline ())! = Null {bufferedWriter.write (length + "\ n");} BufferedReader.close (); bufferedWriter.close (); clientSocket_d.close ();   

Server:

  // TCP connect data output outputout client_d = zero; socket client socket 1 = tap; try {ipAddress = ipAddress.substring (0, ipAddress.length () - 1); ClientSocket1 = new socket (IP address, port number); OutToClient_d = new dataOPTOP (clientSocket1.getOutputStream ());} hold (unknownHostException E) {out.writeBytes ("425 can not open data connection. \" \ N ");} Buf FeredReader bufferedReader = new BufferedReader (string); string length; while ((= length = buffed reader.readline ())! = Null {outToClient_d.writeBytes (length + "\ n");} Out.writeBytes ("250 requested file actions Complete. \ R \ n "); bufferedReader.close (); clientSocket1.close (); outToClient_d.close ();   

}

Do not use readers and authors and readLine (). All files are not text files, and all text files do not contain line breaks.

javascript - Sencha Touch 2.1: How to create/destroy tab content to increase performance? -


I found a tab panel in my viewport with 4 tabs; Is it possible to keep tabs on their own (to tap the 'button'), but what to do / remove the content / dom?

I'm looking at some tabs. RemovesContent () and Tab.createContent (), I think ...

I tried:

  activitemchange: function (component, value, old value, eOpts) {Ext.Viewport.remove (oldtime, true); }   

Whatever is not doing ...

This removes everything:

  activitemchange: function ( Component, value, oldview, EOpts) {Ext.Viewport.remove (Ext.Viewport.getActiveItem (), true); }   

I found the work that was removed:

  oldValue.removeInnerAt (0);   

But what is the 'opposite' of it, that is, how can I set the contents of a tab?

  var myContent = Ext.create ('MyApp.view .My thoughts'); // and now?    

Senior Forum Manager Mitchell Simons created an extension for it. This can be found on their Github page:

Tabs will be removed and cached.

Edit: In your current state, Ux.tab.OptimizedTab , which is incorrect. Lib only makes some changes in some ways (Lib Ext.tab.Panel does not extend in. Extra.tab.Panel. By example, Michele can see that It is expanding Ext.tab.Panel and type the default on optimized-tab .

  Ext.define ('MyApp .view.Main ', extension:' Ext.tab.Panel ', xtype:' main ', Required: [' Ext.TitleBar ',' Ext.Video ',' Ux.tab.OptimizedTab '], Configure : {TabBarPosition: 'bottom', defaultType: 'optimized-tab', item: {...}}}   

Note that you have changed the Lib Classname, In my opinion there is a lack of respect and after this you have given it wrong name and kept it in the wrong folder. (The name given by you is Crossfit.view.OptimizedTab but it is also visible at all

I would like to give you some compliment on your good architecture of the app, I have not seen many people who understand touch architecture but you, Michelle and I have some :)

java - Change background and text color of JMenuBar and JMenu objects inside it -


How do I change the color of the custom background for JMenuBar and JMenu items Can I set it inside? I tried to do .setBackgroundColor and it does not work!

create a new category which extends JMenuBar :

  Public square background menu bar JMenuBar {color bgColor = Color.WHITE; Public Zero Set Color (Color Color) {BG Color = Color; } @ Override Protected Zero Paint Comonant (Graphics G) {SuperPaintConant (G); Graphics 2DG2D = (Graphics 2D) G; G2d.setColor (bgcolor); G2d.fillRect (0, 0, getWidth () - 1, getHeight () - 1); }}   

Now use this class instead of JMenuBar and set the background code to setColor () .

Round variable in Javascript Google Spreadsheet -


I am interrogating a Google spreadsheet and the number I am getting is blowing some load which I I am doing more in and below.

My question:

  function queryValue3 (met1, met2, met3) {var QUERY3 = new google.visualization.Query ('https://spreadsheets.google.com ? / Spreadsheet / tq range = B7: B9 & amp; key = my_key & gid = 10 '); Query3.send {response (response.isError ()} {warnings (error in 'QUERY3:' + response.getMessage () + '' + response.getDetailedMessage ()); Return;} on data3 = response On M3 = data3.getValue (1, 0); M3 = data3.getValue (2, 0);   

The number I am pulling for M2 is apparently 25.3333333333333323 and the function is blowing me up later. Until my number (in this case I want 10th) function works fine 10th Or to make the 100th goal. Using custom rounds (1 decimal) and it looks correct in the sheet but the query is catching the raw number? In most cases my number is complete and I want that there are no decimal in those examples. Can the variable M1, M2, and M3?

thanks for this matter ...

n.toFixed (2);

You can use it to determine the number of numbers after the decimal Yes

Example:

  foo = 25.3333333333; Foo = + foo.to Fixed (2); / / Plus it makes a number-type again, as it converts to a fixed string. Console.log (foo); // 25.33   

Edit: Approximate side effect is the decimal spherical form:

  foo = 25.127; Foo = + foo.to Fixed (2); Console.log (foo); // 25.13   

The entire number has been omitted only one:

  foo = 23; Foo = + foo.to Fixed (2); Console.log (foo); // 23    

mysql - Custom CMS - Storing Content -


I am creating a custom CMS system that will archive articles.

What is the right way to store articles in DB? Given that the article may contain any number of paragraphs or paragraphs and images can be included in it, which are not practical to store each paragraph in a specific area of ​​DB.

I have seen how WordPress posts posts and it appears in a field `post_ content 'to cover raw HTML. Is this an accepted method? By this method I see that the disadvantage is that any HTML mark-up is also collected for each article. If I only store raw text, then the dynamic page that displaces the article will have only HTML mark-up once,

Any ideas?

Thank you.

itemprop = "text">

The area of ​​choice will be a blob type (for example TEXT).

However, which data is a different matter, and actually depends on your implementation, I have worked on similar systems and in the previous archived data it is in the form of:

  • XML - Custom XML tags that are translated and translated by the translation layer in HTML, this method also means that you can make additional inquiries of data from XPATH queries.
  • WMD - Storage data as WMD means that there are no HTML tags that cross site scripting attacks (XSS)
  • HTML is the easiest and fastest of data streaming. The way to sanitize input is to go a long way, XSS and other data that you do not want help, but then it adds more complexity that WMD can solve with differentiation.

    If you are looking for some analytical data associated with images, I would suggest to store the image URI in another table and add it to the URL's primary key ID. This means that you can check image URL copy and not. Image URI can be an identical ID, if you upload and store images within your domain.

php - How to put an alert in jquery to know if an event that you want to add is already in the database or has a conflicting schedule with other events? -


I have a table of reserved events in DB with date, event_name, site, time-start and time-finishing. Now, when I want to book a new event, I first want to see that a certain place has already been captured on a date and timeframe.

This is what I have so far and it is not

   gt;) {echo 'true'; } Else {echo 'false'; }? & Gt; And check-site Php & lt ;? Php session_start (); ('Config1.php'); $ Sql ​​= "select placement of schedule WHERE site =". $ _ POST ['place'] "& amp; date =". $ _ POST ['Date'] ""; $ Select = mysql_query ($ sql); $ Line = mysql_num_rows (select $); If ($ line> gt;) {echo 'true'; } Else {echo 'false'; }? & Gt;    

First of all, you actually enter mysql _ * function :

This extension is deprecated as PHP 5.5.0, and will be removed in the future. Instead, MySQLi or PDO_MySQL extensions should be used.

Second, by inserting value directly into the query $ _ POST , like you are opening yourself in all types of injection attacks you need to make sure That you are avoiding any data to avoid properly.

The third (and possibly why it is not working at all), you're not quoting (possibly string) values, and when you are building your query, syntax errors are - After the variables, the integration operator (. ) is missing Before you save the file, Should be flagged

c# - WPF - node style dependent from deep in tree -


I am looking for information about the preview style in WPF I want to set different text colors for each level of tree . I have 3 levels of trees.

Example:

- & gt; Root (Black)
- & gt; Level 1A (red)
- & gt; Level 2A (green)
- & gt; Level 2B (green)
- & gt; Level 1B (red)
- & gt; Level 2C (green)

Thank you in advance for your help.

You can bind color (foreground or background) to a visual model property with custom logic .

In your case, you should calculate the level with a little logic: Find the level of the parents' visual model and return 1 or Return 0 Parents are redundant.

If you are new to WPF and Tviewview, then I recommend reading it:

arrays - Php unserialize string -


जब मैं var_dump ($ string) करता हूं; मुझे मिलता है

 < ("आईडी": "12", "मान": "Na 4 k \ u00f3 \" "{{" id ":" 11 "," मान ":" गोतोवी क्या यू \ u017cytku "}, {" id ":" 12 " "14", "मूल्य": "पाउ": "" "," "", "" "" 13 "," मान ":" 20 मिनट - रोज़ग्रेज्या डो प्रैसी "}, {" id ":" 14 "," मूल्य " {"Id": "16", "value": ["tekst", "\", \ "id \", "15", "मान": "पाईक मैं ग्रिल वा जेडेम"}, {"id": " /images\/alfa\/domowa\/forninox\/1.jpg "," लाइटबॉक्स "]}, {" id ":" 17 "," मूल्य ": [" tekst "," \ / images \ / अल्फा \ /domowa\/forninox\/1.jpg "," लाइटबॉक्स "]}, {" id ":" 18 "," मूल्य ": [" tekst "," \ / images \ / अल्फा \ / domowa \ / forninox \ /3.jpg","lightbox"]},{"id":"19","value":["tekst","\/images\/alfa\/domowa\/forninox\/2.jpg ", {"Id": "21", "value": "cm 189"}, {"id": "lightbox"]}, {"id": "20", "मान": "सेमी 127"}, {"id": " 22 "," मान ":" cm2 108 "}, {" id ":" 23 "," मूल्य ":" किग 340 "}, {" id ":" 24 "," मान ":" \ u00a6 सेमी 25 \ / 20 "}, {" id ":" 25 "," मूल्य ":" चटाई। Ceramiczny "}, {" id ":" 26 "," मूल्य ":" स्टैल नायरजेज़ेना "}, {" id ":" 27 "," मूल्य ":" डब्ल्यू \ u0142। Ceramiczne "}, {" id ":" 28 "," value ":" min 20 "}, {" id ":" 29 "," मूल्य ":" 7 "}]"   

और मैं इस स्ट्रिंग को सरणी में डालने के लिए क्या करता हूं, इसलिए मैं इसे अनसिरिअल कर रहा हूं, जैसे:

  $ a = unserialize ($ string); var_dump (एक $);   

लेकिन आउटपुट में मुझे मिल रहा है:

  bool (झूठी)   

एनीबी जानता है कि मैं क्या कर रहा हूं गलत?

आपके पास एक JSON स्ट्रिंग है आप

  $ arr = json_decode ($ स्ट्रिंग, TRUE) का उपयोग करना चाहते हैं;   

इसे एक एसोसिएटिव सरणी में डिसेरीलाइज़ करने के लिए।

CSS menu align is not stable in different browsers -


This is my page: I have a problem with CSS if the menu is opened in different browsers, then align the menu Please. I checked that the menu was not fully aligned with 3 different computers. Secondly, when I at least not even align the menu What should I do ?

I used Stylizer to change the CSS code. Here's the code:

  * {margin: 0; Padding: 0; Body {margin-top: 220px; Background: # 000 url (images / buttons .jpg) no-repeat center top; Color: # 5E5E5E; Font-family: Verdun, Ariel, Helvetica, Non-Serif; Font-size: small; Font style: normal; Font weight: normal; Font-type: normal; } H1, H2, H3 {color: # 5E5E5E; } H2 {font: 1em Arial, Helvetica, Sense-Serif; Font-size: 11px; } H3 {font-size: large; Color: # F00; } P, Blockco, UL, OL {margin-down: 1.4 AM; Line-height: 1.8 m; Text align: heir; } P {} BLOCKQUOTE {margin-left: 2em; Margin-right: 2 AM; Font style: italic; } UL [/ * [Empty] margin-left:; *}} Ul li {} OL {/ * [empty] margin-left:; * OLE LAY {} A {TEXT-DECORATION: NONE; Color: # 5E5E5E; } A: hinge {text-decoration: underline; } / * Boxing style * /. Boxed {margin-bottom: 20px; } .Boxed. Content {Padding: 15px; Margin-left: -11px; } / * Post * / .post {/ * [Empty] margin:; * /}. Post. Title {Padding: 10px 0; Font size: 1.6 AM; Font weight: normal; } .post .story {padding: 10px; Margin-left: -7 pixels; Margin-top: 5px; } / * Header * / #header {height: 61px; Width: 1000 pixels; Margin-left: auto; Margin-right: auto; } / * Header & gt; Logo * / #logo {width: 700px; Height: 19px; Margin: 0 auto; Padding: 6px 0; } #lollow h1, #lollow h2 {text-conversion: uppercase; Letter-spacing: 1px; Font-size: 11px; } #lollow h1 float: left; } #lollow h2 {float: right; } # Logo a {} / * header & gt; Menu * / # Menus {Width: 1100px; Height: 27px; } # Menu UL {/ * [empty] margin-left:; * / Padding: 7px 0 0; List style: none; } #Menu LI {DISPLAY: INLINE; } #Menu A {Display: Block; Swim left; Height: 30px; Margin: 0 2px 0 0; Padding: 2px 25px 0; Background: URL (#FFFFF) Repeat-X; Border: 1px solid # 014995; Text align: center; Font-size: 11px; font-weight: bold; Color: # 01499 5; } #Menu A: Hover {background-image: URL (image / 13.jipi); Text-decoration: None; Color: # E5E5E5; } # Menus Active A {Background-Image: URL (Picture / 12.JPG); } / * Wrapper & gt; Font * / #fonts {font-family: "Arial Black", gadget, non-serif; Color: # 5E5E5E; } / * Center wrap * / #wrapper {width: 1000px; Margin-left: auto; Margin-right: auto; } / * Content * / # content {width: 60px; Padding: 50px 0; } # Log INPUT {margin-down: 5px; Padding: 2px 5px; Border: 1px solid # 385b88; Font-family: Verdun, Ariel, Helvetica, Non-Serif; } #InputText1, #InputText2, #InputText3 {Color: # 014995; } #InputSubmit1 {background: # 385B88; Color: #FFFFFF; }    

Given that this design is not completely liquid or responsive, it is a lot Easy fix is ​​just "margin-right: -10px;" On the style rule for the # add menu, this will move the menu to the location where it should start.

In other words:

  # menu (margin-right: -10px;}    

How to exit a Windows Forms Application in C# -


I am writing a windows form application in C # which uses only 1 form when I exit the application and I want to close, I have put the code

  lost to private zero () {MessageBox.Show ("bye"); This.Close (); }   

Within class form1: form , which is a form class that was automatically created by Visual Studio. But when this code runs, I get a falling message:

  An unrestricted exception of System.Runtime.InteropServices.ExternalException 'type Additional information in System.Drawing.dll: A normal Error occurred in GDI +   

A picture of the message:

Error Message </ P> <p> What's the problem? </ P> <p> How should I get out of my application? </ P> </ div> <p> <div class =

You need to first quote your string So that the message box will know what to do, and then exit your application to exit the application context.

  Private zero free defeat () {MessageBox.Show ("Bye"); Application.Exit ();}    

How to smooth/blur 2 similar images using opencv -


I'm looking for a way to blur 2 images (some shore images taken with the same device / setup But may be slightly different light) Two similar products (the actual product that is :), so the blurred kernel will consider the same forms found in two images.

I can get a type of image in one / both of the images, but what's next? In general, I want to compare images to find disparities between them. any offers?

You can do the following to find equality or inequalities.

  1. Image Registration ... Try to find the number of features in both images ... The number of similar attributes is the figure that how many pictures are different / different ...
  2. If two images are very similar here with some more details .... you can go ahead and look for shapes, number of numbers and their length Can receive are ... any additional feature additional contour will produce ... although the same in both images, which may not work for things, but individual or scale or oriented in both images.
  3. Can prove to be broadly simple but effective ... Try to find the correlation between the two images ... In this case, leave the small details as the whole process is based on intensity .. < / Li>

    More information about what type of image or object you are viewing will help solve your problem ...

how to use jQuery.when() with multiple jsonp requests? -


I have two cross domain JSP requests that need to be completed before executing any other method. So I tried $. When () function

  $ When (getX (), getY ()) Then (createXY);   

getX () and getY () $ .jax () Request two different domains with different jsonp callbacks.

Unlike my original idea, Excloses gets before callback return.

Does anyone provide me an example when using a function when multiple async jsonp requests are completed?

$ When working for () , it should be passed to the deferred object which it is waiting for. Make sure that your getX () and getY () functions are returning to the deferred object created by jQuery's AJAX call, which makes each.

If you want to help in doing so, then post the code for getX () and getY () .

Here's an example:

  $ When ($. Ajax ("/ page1.php"), $ .ajax ("/ page2.php")) done (function (a1, a2) {/ * a1 and a2 are page 1 and page 2 of ajax requests Resolved logic for, respectively, * / var jqXHR = a1 [2]; / * logic ["success", status text, jqXHR] * / if (/ alert / test (jqXHR.responseText)) {warnings (" The first page has 'alerts somewhere'.);}});    

android - How do I hide title text in application? -


In my app, I am using a logo instead of an icon on the top by using Android: Logo = "@ Drawback / Logo "The only problem in the manifest file is that the title text of the application still appears in front of it. I have seen some solutions, but anybody who can be with my current API minimum 5 which I want to keep. How do I do that? And please do not suggest setting Android: label = "" as suggested in other similar questions, because it creates that the launcher icon does not even have a label.

Just add this activity to your activity onCreate

  setTitle ("");    

indexing - Mongodb, getIndexes. Zero in 'key' -


माँगोड शेल में "getIndexes" कमांड का आउटलुक है:

  db Users.getIndexes () [{"v": 1, "key": {"ऑनलाइन": 1, "क्षेत्र": 1, "स्थिति": 0}, "ns": "pr.users", "name" : "Online_1_region_1_status_-1"}, {"वी": 1, "कुंजी": {"जन्मतिथि": 1, "स्थिति": 1, "क्षेत्र": 1, "लिंग": 1, "प्रोफ़ाइल। समय": "कुंजी" मानों में "0" का क्या अर्थ है? 1}, "ns": "pr.users", "name": "birthdate_1_status_1_region_1_sex_1_profile.uptime_-1"}]   

? डॉक्स में () केवल "1" और "-1" हैं।

system.indexes.key

इसमें एक दस्तावेज़ है जिसमें इंडेक्स में रखी चाबियाँ हैं, और सूचकांक का क्रम इंडेक्स या तो अवरोही या आरोही क्रम हो सकते हैं। ऋणात्मक एक का मान (जैसे -1) इंगित करता है कि सूचकांक क्रम अवरोही क्रम में क्रमबद्ध है, जबकि एक सकारात्मक मूल्य (जैसे 1) एक आरोही क्रम में क्रमबद्ध सूचकांक को इंगित करता है।

धन्यवाद!

मैं कहूंगा कि यह अपरिभाषित व्यवहार है नीचे दिए गए उदाहरणों को देखते हुए, मानो वास्तव में 0 पर सेट इंडेक्स वेल्यू दिशा से भ्रमित हो जाता है।

सरल परीक्षण:

अवरोही सूचकांक
  db.test.ensureIndex ({t: 1})   

टेस्ट कलेक्शन को फ़ील्ड 't' द्वारा क्रमबद्ध करते समय इस्तेमाल कर्सर को देखते हैं

  db प्रयुक्त कर्सर:  "कर्सर": "BtreeCursor t_1"      
  db.test.find.sort ({t: -1}) समझाएं ()   

प्रयुक्त कर्सर: "कर्सर": "BtreeCursor t_1 reverse "

यह अपेक्षित व्यवहार है।

आरोही सूचकांक
  db.test.ensureIndex ({t: -1}) < / Code>  

-

  db.test.find.sort ({t: 1})। समझाओ ()   

प्रयुक्त कर्सर: "कर्सर": "BtreeCursor t_-1 रिवर्स"

  db.test.find.sort ({t: -1}) समझाओ ()   

प्रयुक्त कर्सर: "कर्सर": "BtreeCursor t_-1"

यह भी व्यवहार की उम्मीद है। < एच 2> सूचकांक 0

  db.test.ensu रीइंडेक्स ({टी: 0})   

-

  db.test.find.sort ({t: 1})। समझाओ ()   

प्रयुक्त कर्सर: "कर्सर": "BtreeCursor t_0 reverse"

  db.test.find.sort ({t: प्रयुक्त कर्सर:  "कर्सर": "BtreeCursor t_0 reverse"   

दोनों प्रकार के निर्देशों के लिए मंगो है रिवर्स कर्सर का उपयोग करना

सुनिश्चित नहीं है कि क्यों मोंगो इस तरह से चीजों को संभाल नहीं रहा है। दस्तावेज़ीकरण में भी सरल अनुच्छेद पर्याप्त होगा।

मजेदार बात, आप सूचकांक दिशा के रूप में भी स्ट्रिंग सेट कर सकते हैं।

  {"v": 1, "key": { "T": "sjdhfsdfsdf"}, "ns": "playground.test", "name": "t_"}   

या इस तरह से बातें:

  db.test.ensureIndex ({t: ObjectId ()}, {additionalParam: "dfsdf"}) ... {"v": 1, "key": {"t": ऑब्जेक्टआईडी ("51527ebaa845a81ea8434d69") }, "Ns": "playground.test", "name": "t_", "अतिरिक्त पैरा": "dfsdf"}    

php - Buy Now button return url: Update field in database -


What I'm trying to do (and how to not explain it) After successful completion of a successful transaction, PayPal , I need it to go back to my website and update a field in the database based on the user.

I have no indication of this, and I am searching for hours.

You can do this in two ways, after the payment is completed, you can update your database. Can use IPN or PDT. Better than two methods, IPN must be used, or in combination with PDT, at least use IPN.

Quick Payment Information (IPN) is a messaging service that informs you of events related to PayPal transactions. You can use it to automate back office and administrative tasks, such as completing orders, tracking customers, and providing status related to transactions and other information.

You can find more pages on the IPN. Apart from this, there are some more links on the left hand side of the page that are useful. There are pages for creating an IPN with a listener, setup, test, IPN history, FMF, IPN / PDT variable and sample code.

PayPal's PDT system verifies the merchant site's use of the PayPal payment standard and lets them certify this information such sites can display this data locally in a data order confirmation. Are you ??? Page. IPN is more reliable than PDT, and with PDT, it also depends on clicking on a button to come back to your site. If they do not click on the button to return to your site, then no information is sent back and you can not send this information again as you can with the IPN. You can find more on PDT.

I personally use PDT to crimp a dynamic thanks page on my site, and I use IPN to update my database and automate some tasks. Hope this will help. :)

c - Linked list , why am I getting the Incompatable type and incomplete struct error -


मान लें कि मेरे पास 2 स्ट्रेट हैं।

  typedef struct नाम {char * name; संरचना परीक्षण * अगला; } Name_t; टाइपिप्फ़ैफ़ स्ट्रेट टेस्ट {int grade; Int studentNumber; संरचना परीक्षण * अगला; } Test_t;   

तो मार्कर का परीक्षण करने के लिए एक संकेतक है कि मैं कैसे लिंक सूची बनाऊँगा?

मैंने इसे करने की कोशिश की

  name_t * marker1 = malloc (sizeof (name_t)); // किसी अन्य फ़ंक्शन test_t * temp = malloc से नाम जोड़ा गया (sizeof (test_t)); // ग्रेड और छात्र संख्या को दूसरे फ़ंक्शन से जोड़ें यदि (मार्कर 1- & gt; अगला == नल) मार्कर 1- & gt; अगली = अस्थायी;   

लेकिन यह मुझे त्रुटि देता है

मैं यह तय करने के बारे में कैसे जाना होगा? यह मेरी पहली बार लिंक्ड सूची को कोडित है इसलिए किसी भी मदद की सराहना की जाएगी

संपादित करें: मैंने भी निम्नलिखित फ़ंक्शन में किया

  शून्य परीक्षण (name_t * marker1, int data ) {Test_t * temp = malloc (sizeof (test_t)); Test_t * स्थान = शून्य; temp- & gt; ग्रेड = डेटा; temp- & gt; अगले = शून्य; स्थान = marker1- & gt; अगले; यदि (स्थान == नल) {// printf ("% i \ n", temp- & gt; ग्रेड); marker1- & gt; अगले = अस्थायी; } और {जबकि (स्थान! = नल) {printf ("% i \ n", स्थान- & gt; ग्रेड); Printf ("% p \ n", स्थान- & gt; अगला); स्थान = स्थान के & gt; अगले; } स्थान = अस्थायी; }}   

हालांकि यह किसी कारण के लिए सूची नहीं है। किसी भी विचार क्यों?

संरचना परीक्षण * अगला; एक टैग को संदर्भित करता है कोड> नाम परीक्षण

  टाइप की गईं संरचना THIS_IS_WHERE_TAG_NAME_SHOULD_BE {...} परीक्षा;   

और आपके पास ऐसा टैग नाम कहीं भी नहीं है। इसे जोड़ें।

GStreamer - Sample Plugin -


I am a newbie in gstreamer and am trying to develop a sample plugin for caption decoding.

I have downloaded the GSTimer plugin template: based on the information.

When I launch the plugin from the command line it is working fine.

I wrote a sample app to verify the plugin But now, I'm having trouble determining the pipeline position to play Below is the code snippet < / P>

Any information will be very helpful.

Thank you in advance, Revolution


  gst_init (NULL, NULL); Loop = g_main_loop_new (tap, true); G_print ("\ nGstreamer startup and loop is created"); Pipeline = gst_pipeline_new ("pipeline"); Source = gst_element_factory_make ("filesrc", "source"); Filter = gst_element_factory_make ("myfilter", "testfilter"); Sync = gst_element_factory_make ("fakesink", "sync"); If ({zero! = Pipeline) & amp; amp; (NULL! = Source) & amp; amp; (NULL! = Filter) & amp; (Null! = Sync)) {g_print ("\ n Successfully Factory Elements" ); G_object_set (G_OBJECT (source), "location", filename, null); G_print ("Set file name \ n"); G_object_set (G_OBJECT (filter), "silent", 1, faucet); G_print ("set \ nshort type \ n"); / We add a message handler * / bus = GSTPPline_get_bus (GSTPPEN (pipeline)); Bus_watch_id = gst_bus_add_watch (bus, bus trap, loop); Gst_object_unref (bus); G_print ("\ n Monitor to view and view just"); Gst_bin_add_many (GST_BIN (pipeline), source, filter, sync, faucet); Gst_element_link_many (source, filter, sync); G_print ("\ n Factory elements are added and linked"); G_signal_connect (filter, "pad-added", G_CALLBACK (on_pad_added), filter); G_print ("Read Now:% s \ n", "test.txt"); G_print ("establish pipeline state to play"); Ret = gst_element_set_state (pipeline, GST_STATE_PLAYING); If (ret == GST_STATE_CHANGE_FAILURE) {g_print ("\ n Failed to set pipeline position to play \ n"); } Else {g_print ("\ nTo set the pipeline state successfully \ n"); }} And {g_print ("failure to create factory elements"); }   

After trying some examples on gstreamer elements, the problem was found .

In addition to the filric, filter, faxink: If I also add the decoder element to the pipeline, then I want to change the game

but why it is necessary - I'm still trying to understand it

And sometimes, the name is also causing problems to make the pipeline: gst_pipeline_new (" Pipeline

SQL Rollup last 4 weeks total -


I have a table, which I want to get in the last four weeks but I can call it a SELECT (the last 4 Want to return with order 1 column of weeks - if they exist).

  purchasing ID order 1 date charvecotal ----------- - ------------------- ---- --- --------------- 1 1.00 2013-04-21 14.00 2 2.00 2013-04-14 12.00 3 3.00 2013-04-07 9.00 4 4.00 2013-03-31 5.00 5 5.00 2013-03-24 0.00   

My understanding of each record in my table That is, you want to see the sum of Order1 for yourself and record each record for the date value within four weeks before the primary. Here you go: << p>

  Create table misestablishment (PurchasingId int no zero primary key identification (1,1), order 1 plus null, [Date] date is not zero Insert MisterTable (Order 1, [Date] Price (1.00, '2013-04-21') Insert MisTable (Order 1, [Date]) Price (2.00, '2013-04-14') Insert Missterable (Order 1 Value (3.00, '2013 Microsoft (Order 1, [Date]) Price (5.00,' 2013-03-24 ') MisterTable (Order 1, [Date]) Price (4.00,' 2013-03 -31 ') Summum Join PurchasingId, t1.Order1, t1.Date, SUM (ISNULL (t2.Order1, 0)) MysteryTable T1 in total intersection join MisterTable T2 at DATEDD (ww, -4, t1.Date) & lt; = T2.Date and T1.Date & gt; T2.Date Group by t1.PurchasingId, t1.Order1, t1.Date order by t1.Date desc   

Explanation:

Join yourself on the table, T1 to return the records, join TB to record the T2, on the basis of the date of T1, four weeks of loan, less than the date of T2 or its Date of date and T2 Mr. more from the date of 2. Then the T1 field and the amount recorded by T2.Order1 group. The left external insertion account for a record in which there will be no predecessor data.

c - The #define variable usage -


I am working on a project written in the C programming language. I found a code snippet below

  unsigned letters [10]; #define arr () (& amp; value [0])   

How have they defined "function" ( arr () ) # Define the variable for an unsigned four array?

They are trying to use variables such as arr () [1], arr () [2] etc.

  1. arr () + 2 is equal to value + 2 . I tried to run a small program, but due to two results I got different answers. How is this possible. Because they are telling the address of the first array on arr () . Should not these two be equal? Can anyone explain what is the significance of defining a variable as above?

    I can not tell you why they did it, but yes, arr () + 2 and value + 2 are the same thing.

javascript - Canvas images do not load until click event... I want to load when page loads, how? -


I am making warships, board games on an HTML5 canvas. I have a problem loading my ship image when the page loads

background information:

1. I have 2 canvas elements, with 2 references in each

2. If I put PlayerGrid.js before OpponentGrid.js then I have to click on the screen to show my ships. Draws

3kdra () is a grid, and images of a time when they (Createships are drawn CreateShips ()) simply makes various ship items and assign images to each object Does.

4. I have many places to download (and), but they still do not show.

Does anyone know what this can be? Is this a reference in context or canvas? Ship pictures show that when I put OpponentGrid.js before my PlayerGrid.js, but then there is a big problem with my XMLHttpRequest which is not resolvable.

How should I call my Draw method after all loading? Can I finally call my Draw () in my battleship.html?

To ensure that all your images are loaded before using them

Code and a Basic:

  & amp; ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = "stylesheet" type = "text / css" media = "all" href = "css / reset.css" /> & Lt ;! - Reset CSS - & gt; & Lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Style & gt; Body {background color: ivory; } Canvas {boundary: 1 px solid red;}    

algorithm - How to traverse through a adjacency matrix? -


An adjacency matrix presents a connection between the nodes in an arbitrary tree.

Here's the excitation matrix that presents an unfiltered graph:

 1 2 3 4 1 0 1 1 0 2 1 0 1 0 3 1 1 0 0 0 0 0 0 < / Pre> 

This matrix presents a graph where nodes 1 and 2 are connected, 1 and 3 are connected, 2 and 3 are connected.

How to do all the combinations of possible path in this type of graph using such matrix? I mean choosing a node 1 is a different combination, then say, 1-2 is a different combination 1-2-3; 3-1-2

So how to brush all the combinations using these rules?

I like C #, C ++, or Java language samples)

Given the constraints of your example, it does not take any more than 40 lines of code.

Basically you are currently inspecting one to visit one connected nodes. There is no new node to support tracking after you detect it.

In addition to this, you will need some methods to keep track of the path that is traveling for the current node. In the example, I keep this information on the stack to keep it safe from some memory management headache.

  #include & lt; Stdio.h & gt; #define N_NODES 4 # Define NAME_OFFSET 1 int edges [N_NODES] [N_NODES] = {{0, 1, 1, 0}, {1, 0, 1,}, {1, 1, 0,}, {0, 0, 0}}; Int visited [N_NODES] = {0, 0, 0}; Structure node {int node; Struct node * prev; }; Zero Travel (Int node, Structure node * prev_node) {Structure node n = {node, pre_node}; Structure node * p = & amp; N; Printf ("% d% s", p-> node + NAME_OFFSET, (p-> gt; prev! = NULL)? "- & gt;": "\ n"); While ((p = p-> behind)! = Null); Visited [node] 1 =; Int i; For (i = 0; i & lt; N_NODES; ++ i) if (visited (i [i] == 0) & amp; (edge ​​[node] [i] == 1)) (i , & Amp; n); Visited [node] = 0; } Int main (int argc, char * argv []) {int i; For (i = 0; i & lt; N_NODES; ++ i) {Visit (i, NULL); } Return 0; }   

Product:

  1 2-> 1 3-> 2- & gt; 1 3 - & gt; 1 2-> 3-> 1 2-> 2 3-> 1-> 2 3-> 2 1- & gt; 3-> 2 3-1-> 3 2- & gt; 1-> 3 2- & gt; 3 1- & gt; 2- & gt; 3 4   

I think what you wanted.

sockets - A simple java client server program -


So I have programmed this client server in Java for my Cloud Mini project. Note that this is a small module of a big project on which I am working. I need a string to send from the client to the server The server will return because it has returned to the client. (The code will be modified later as the string is processed before sending it back) The client will send the string when necessary on the server. This means that it is mandatory for the server to run indefinitely.

The problem I face here is that my server only works for the first time when the client sends the string. If I run the client with the second string the second time, then I will get back the same string I sent to the server before!

Here is my server program:

  public square server {public static Boolean x = true; Public stable string reply; Public Static Zero Main (String A []) Exception {System.out.println ("Access Server Console ..") throws; Socket echosocket = null; ServerSocket ServerSocket = Null; PrintWriter = Null Out; Buffet = thread in the thread; System.out.println ("Starting connection."); Boolean run flange = true; Try {serverSocket = new ServerSocket (77); While (runflags) {echoSocket = serverSocket.accept (); Out = new printIter (echoSocket.getOutputStream (), true); BufferedReader stdIn = new BufferedReader (New InputStreamReader (System.in)); While (x) {new = BufferedReader (new InputStreamReader (echoSocket.getInputStream ())); Answer = in.readLine (); If (answer! = Null) {x = false; }} System.out.println ("Received:" + Answer); Out.println (responses); System.out.println ("Sent Back:" + Answer); StdIn.close (); }} Hold (exception e) {System.out.println ("Exception in starting server:" + e.getMessage ()); } Finally {out.close (); In.close (); EchoSocket.close (); }}}   

This is my client program:

  public class client {public fixed string reply, temporary; Public stable boolean x = true; Public customer () {temp = "lala"; } Public Clients (String T) {Temp = t; } Public static zero principal (string [] args) throws IOException {socket eCoscat = null; PrintWriter = Null Out; Buffet = thread in the thread; Try {echoSocket = new socket ("localhost", 77); Out = new printIter (echoSocket.getOutputStream (), true); In = new BufferedReader (new InputStreamReader (echoSocket.getInputStream ())); } Hold (unknownHostException E) {System.err.println ("Host does not know about: localhost."); System.exit (1); } Hold (IOException e) {System.err.println ("Could not find I / O for connection: localhost."); System.exit (1); } BufferedReader stdIn = new BufferedReader (new InputStreamReader (System.in)); Temporary = "lala"; // This is the string to be sent. Println (temp); While (x) {Reply = in.readLine (); If (answer! = Null) {x = false; }} System.out.println ("Answer:" + Answer); Out.close (); In.close (); StdIn.close (); EchoSocket.close (); }}   

Can anyone know what is the problem here?

  while (x) {new = BufferedReader (new InputStreamReader (echoSocket.getInputStream ()) ); Answer = in.readLine (); If (answer! = Null) {x = false; }}   

Your server connects a client for the first time in this loop, and it sets the string to some input from the customer. However, it never enters this loop, because the values ​​of x do not change back to the right.

asp.net mvc - What date format should be set to show am/pm in lower case? -


I am developing the MVC 3 application. In the view I am displaying the name along with the date time created. This is displayed as a

Nick Morris 27-Mar-13, 11:49 am, <->

, but I I want to show in

  [DisplayFormat (DataFormatString = "{0: DD MMM yy hh: mm tt}")] Public System Create datetime data {get; Set; }   

and I am using the code in the view ... . @ html.DisplayFor (ModelItem = & gt; item.CommentDateTime.ToString ("Dddd, MMMM d, yyyy a \\ th: mmtt"))

What do I change in the date format? This error is showing.

You can see it in the DisplayFor assistant:

  @ Item.CommentDateTime.ToString ("dd-MMM-yy hh: mm") @ item.CommentDateTime.ToString ("tt"). ToLower ()   

In this case you do not need the DisplayFormat attribute on your visual model.

File upload form for custom Joomla component -


I have a form that is of type file when the user clicks on the Save icon, then I naturally I want to upload to the server and save the file name in the database. I tried to test this by echoing the file name but it does not work. Also, how do I add a file name to the database? Is this done in the model? Thanks!

Controller / customcom.php

  Gymport ('joomla.filesystem.file'); Class CustomComControllerCustomCom JControllerForm {function save () {$ file = JRequest :: extends getVar ( 'img_url', null, 'files', 'array'); $ Filename = JFile :: makeSafe ($ file ['name']); $ Filename echo; }}   

Model / Forms / Custom Com Xml

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Form enctype = "multipart / form-data" & gt; & Lt; Fieldset & gt; & Lt; Field name = "img_url" type = "file" label = "image upload" description = "" size = "40" square = "input box" default = "" /> & Lt; / Fieldset & gt; & Lt; / Form & gt;    

Just thought it.

The right way

  $ jinput = JFactory :: getApplication () - & gt; Input; $ Files = $ jinput- & gt; File-> Get ('jform'); $ File = $ files ['img_url'];   

This should do the trick

  • Size
  • tmp_name Type

    I removed my original answer because it was misleading.

  • c# 4.0 - Using angulars ngResource get method -


    I have a basic controller defined in C #, its only purpose is to identify which current user is

      Namespace ProjectName.Controllers {Public Class UserController: ApiController {// GET API / User / Public String (Go) {User User.Identity.Name; }}}   

    I have an NGSOS defined to see that controller

      cript.factory ('user', function ($ resource) { Return $ resource ('/ API / user')});   

    Finally I try to get that user in my angle controller

      $ scope.checkIfAuth = function () {$ scope.user = User.get (); Console.log ($ scope.user); If ($ scope.user === '"ds //: lemijser' ') {console.log (" success "); }};   

    Problem $ scope.user is a resource object that looks like this

      resources {$ get: function, $ save: function, $ query: "Remove: Function, Delete: Function} 0:" "1:" D "2:" S "3:" \ "4:" \ "5:" l "6:" E "7:" M "8 : "I" 9: "e" 10: "s" 11: "z" 12: "r" 13: "" __proto__: resource   

    anyway just containing my username User.query () returns only a blank table to get the string.

    I Looking into the implementation of coalition Q Wired Library () I am still working with MVC 4.0 and it has become more flexible than NGRSORS.

    However, in relation to your question, here is your problem. That you are requesting an async server your server is starting to react to synchronous. Okay, the data is still not getting (why are you looking at an empty array []) This empty array is basically telling the server "Hey, There is a good working protocol on the ripe http request, we are getting your data, this is an empty array to prove where we will get the data from you. "

    In other things, your problem is That you are examining its (even roughly) one before checking the value of $ scope.user.

    You have two options (at least in my knowledge) for simple improvements: You can set $ scope.user to respond to a different function or server in another service, and then Once it is received, you can use the feedback. Or (better 'simple' fix) service, which essentially tells your system that "until my ASCNC request is made cool, and I have my data."

    python 3.3: struct.pack won't accept strings -


    I am trying to use struct.pack to write a padded string in a file but it does not have to be 3.x Interpreters does not work anymore. An example of how I am using it:

      mystring = anotherstring + "some time ago" output = straight pocket ("30s", meststring);   

    This is fine in previous versions of Python, but with 3 it generates an error to demand a byte object. Docs means that it appears to convert any string into a UTF-8 byte object without complaining (and I do not care if multi-byte characters have to be shortened):

    : "C, S and P conversion codes work on objects bytes, but packing with such codes also supports the str object, which are encoded using UTF-8."

    How do I read other documents that are using struct.pack along with strings correctly reading documents?

    Yes, up to 3.1 Struct.pack () incorrectly utf -Instead of strings on 8 bytes; It was fixed in Python 3.2. See.

    The conclusion was that the underlying conversion was a bad idea, and it was returned, while developers still got the chance to do this:

    I like to break I'm looking forward to maintaining a broken API for 10 or 20 years today :-) And we have a very small user base that is using Python 3, it is now easier to change it than the next release .

    Also in the document:

    struct.pack () now only s string Allows bytes for pack codes. In the past, this text will accept logic and using UTF-8 will give the byte an indication form. It was problematic because it was creating perceptions about correct encoding and because a variable-length encoding could fail when writing a fixed length segment of the structure.

    You must clearly encode your stars before packing.

    javascript - How to show something under a particular situation -


    I have done so far:

      & lt; Form & gt; Select image: & lt; Select ID = "Artwork" & gt; & Lt; Options & gt; Image 1 & lt; / Options & gt; & Lt; Options & gt; Image 2 & lt; / Options & gt; & Lt; Options & gt; Image 3 & lt; / Options & gt; & Lt; Options & gt; Image 4 & lt; / Options & gt; & Lt; Options & gt; Image 5 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input id = "turnin" class = "turnin" type = "button" value = "upload" onclick = "start ()"> & Lt; / Form & gt; & Lt; Script type = "text / javascript" & gt; & Lt ;! - Start the function () {var select = document.getElementById ('Artwork'); Select Var = selected. Options [select. Selected index] .text; $ ('# Blah'). Prepaid ('& lt; img id = "image_2" src = "image2.jpg" /> & gt;'); }; // -> & Lt; / Script & gt;   

    However, I need

      $ ('# blah'). Prepaid ('& lt; img id = "image_2" src = "image2.jpg" /> & gt;');   

    Only the option "image 2" occurs when the part is effective, what is there any way to do this?

    EDIT: If there is any method then it will also be useful that the button works only once.

    start function () {var select = document.getElementById ('artwork'); If ($ (select) .val () === 'Image 2') {$ ('# blah'). Prepaid ('& lt; img id = "image_2" src = "image2.jpg" /> & gt;'); }}

    Python flask jinja image file not found -


    Newbie Question

    I am using a webframe for flasks, Python. Uses Genja to render the flask template. I do not know which version of Jinnah Flask uses, and I do not know how to recover Jinnah version or flask version. I use Python version 2.7.

    The template has an image in the CSS / image directory. This image is showing while viewing the template as a file directly in the Firefox browser.

    but not while executing the flask:

      flask import flask, render_template app = flask (__name__) @ app. Root ('/ Hello /') @ app Root ('/ Hello / Lt; Name & gt;') Hello Deaf (name = none): Return reader_template ('Basic' 'name, name = name) __name__ ==' __main__ ': app.debug = true app .run ()   

    The contents of the HTML file:

      & lt ;! DOCTYPE HTML & gt; & Lt; Html & gt; & Lt; Body & gt; & Lt ;! - variable example start - & gt; {% If name%} & lt; H1 & gt; Hi {{name}}! & Lt; / H1> {% Else%} & lt; H1 & gt; Hello World! & Lt; / H1> {% Endif%} & lt ;! - variable example end - & gt; & Lt; Img src = "css / images / icons / resultset_previous.png" width = "16" height = "16" alt = "previous" title = "previous" range = "0" & ​​gt; & Lt; / Body & gt; & Lt; / Html & gt;   

    Template runs fine and variable example runs as expected but images are not displayed Debug returns: "GET /hello/css/images/icons/resultset_previous.png HTTP / 1.1" 404 -

    I run the flask in virtual env as explained in the documentation. The path of the image seems unknown, for the flask, you should place the stationary folder normally under a folder called "static" and then use the url_for function to say that your project is called "my project" and your example It should look something like this:

      myproject / app.py template / static / css / images / icon / result pivres   

    Then in the template, you can call

      & lt; Img src = {{url_for ('static', filename = 'css / images / icons / resultset_previous .png')}} width = "16" height = "16" alt = "previous" title = "previous" limit = " 0 "& gt;   

    In addition, to answer your question about jinja version etc., check it



    error installing Subclipse 1.8.x on Eclipse Java EE Juno SR2 64bit -


    I tried to install it using the window - & gt; Install new software and then I gave the link

    I tried to restart the eclipse, restarting the computer before it runs without any problems without installation.

    Error with Eclipse: Problem occurred

      There were items to establish a session reference error while gathering: (profile = APP. Package.g, step = org.eclipse.equinox.internal.p2.engine.phases.collect, operand =, verb =). Unable to read the repository at http://subclipse.tigris.org/update_1.8.x/plugins/org.tigris.subversion.clientadapter.javahl.win64_1.7.10.jar. Connection reset    

    file, try it from the browser only between eclipse and server or network There should be some kind of hesitation.

    Note that subclips also provides zipped P2 repositories which you can download.



    sql - adding CHECK to impose constraints on more than one table -


    I want to modify the following DDL to add check barriers so that one store manager works on the same store and store Can not help

      create employee employee (employee_number CHAR (5), no one can name the name VARCHAR (30), virtual key (employee_number), foreign key (store_code) reference Shop) Create Table Collection (store_code CHAR (5) No, Type VARCHAR Type (15), tax MARC_CODE CHAR (5), primary key (store_code) foreign key (employee_number) referrer employee) Table forming product (ProductCorad CRAR) not faucet, description VARCHAR (150), cost DEC (10,2), primary key (product code)) Make Tables Stocks (StoreCode CRAR (5) No NULL, Product_code CHAR (5) Faucet, primary key (product_code, store_code), foreign key (product_key) reference product, foreign key (store_code) reference forum)    

    The lack of an investigation is limited to a line on a table.

    If you really want to implement such investigations then I think that you have to use triggers.

    Note that you have established many relationships for work-related and management. If it were multiple-to-one, then it would be possible because it would look like the employee (number, name, work_t__store_code, management_store_code). And the constraint will be checked only (manages_store_code is zero or management_store_code = task_t__store_code).

    php - Make ID negative in a JOIN -


    I have this query

      SELECT t1 *, T2. * Table 1 to t1 I want to consider "T.Id" (INT type) negative, so basically I just have to add "-" first. "320". I did not try with anything like this:  
      t2.id = 't1.' - 'id'   

    How can I do this? / P>

    Use a simple product:

      t2.id = - 1 * T1.id '   

    algorithm - Calculate color that differs from background and foreground -


    निम्न चित्र देखें

     यहां छवि विवरण दर्ज करें

    मैंने तीन रंग निर्दिष्ट किए: पृष्ठभूमि, अग्रभूमि और फ्रेम वे मुझे ठीक लगते हैं एक उपयोगकर्ता केवल पृष्ठभूमि और अग्रभूमि रंगों को बदलने में सक्षम है। मैं अपने आप को फ्रेम रंग की गणना कैसे कर सकता हूं और यह सुनिश्चित कर लें कि यह पृष्ठभूमि और अग्रभूमि दोनों रंगों से अलग है (यह बहुत अच्छा होगा यदि यह रंग बहुत भयानक नहीं लगेगा)।

    संपादित करें < / P>

    डिफ़ॉल्ट रंग स्कीमा के रूप में दिए गए रंगों का इलाज करें इसलिए, 3 हार्डकोड रंग हैं जो डिफ़ॉल्ट रूप से उपयोग किए जाते हैं लेकिन, एक उपयोगकर्ता कस्टम पृष्ठभूमि और / या अग्रभूमि रंग सेट करने में सक्षम है। इसलिए, भले ही फ़्रेम का रंग डिफ़ॉल्ट पृष्ठभूमि / अग्रभूमि रंगों के लिए जाना जाता हो, तो इसे सभी कस्टम पृष्ठभूमि / अग्रभूमि रंगों के लिए स्वचालित रूप से गणना किया जाना चाहिए, जो कि उपयोगकर्ता निर्दिष्ट करने में सक्षम है।

    स्थिर:

    • bkg_color - डिफ़ॉल्ट पृष्ठभूमि रंग
    • frg_color - डिफ़ॉल्ट अग्रभूमि रंग
    • frame_color - डिफ़ॉल्ट रंग का रंग

      इनपुट:

      • custom_bkg_color - कस्टम पृष्ठभूमि का रंग
      • custom_frg_color < / Code> - कस्टम अग्रभूमि रंग

        आउटपुट:

          custom_frame_color = f (bkg_color, frg_color, frame_color, custom_bkg_color, custom_frg_color)   

        रंग 24 बिट आरजीबी है चित्र केवल विज़ुअलाइज़ेशन के लिए है।

        क्या आप सुनिश्चित हैं कि चित्र को यह आकार जरूरी होगा ? यदि हाँ, तो आपको पृष्ठभूमि (पहले पिक्सेल) और अग्रभूमि (केंद्र पिक्सेल) का रंग पाने के लिए केवल ऊपर बाएं कोने में पिक्सेल रंग (पहले पिक्सेल) और पिक्सेल को पकड़ना होगा। तब आप उदाहरण के लिए उन दोनों के बीच औसत मूल्य की गणना कर सकते हैं और इससे आपको एक अलग रंग दिया जाएगा। यह संभव है कि "औसतन" रंग दूसरे दो समान है यदि वे उनके बीच समान हैं। यदि ऐसा है तो आप कुछ अन्य ऑपरेशन कर सकते हैं।

    xslt - How to sum different fields in XSL when some might be null? -


    मेरे पास निम्न XSL है:

      & lt; xsl: value-of select = ' अनुवाद (प्रारूप-संख्या (गज़ / बीएएफ / सीएच 4 + गज़ / एसटीडी / सीएच 4 + गज़ / बीएसए / सीएच 4 + गज़ / बीबीएस / सीएच 4 + गज़ / बीएचएफ / सीएच 4 + गज़ / बीन / सीएच 4, "### ### # ## ## 0 ###### "),"। ",", ") '/ & Gt;   

    यह राशि अच्छी तरह से जोड़ती है जब मेरे सभी आइटम मूल्य हैं हालांकि, यदि इनमें से कोई एक रिक्त है ( & lt; CH4 xsi: nil = "true" /> gt; ), तो मेरी रकम NaN बन जाती है।

    अब तक मैंने एक नया फ़ंक्शन जोड़ने की कोशिश की। लेकिन यह पीडीएफ जेनरेटर द्वारा समर्थित नहीं है। ( System.Xml.Xsl.XslLoadException: 'xsl: फ़ंक्शन' अभी भी कार्यान्वित नहीं किया गया है )

    मैंने XsltArgumentList । एक सरल वापसी मूल्य ?? 0; लेकिन मुझे भी एक अपवाद मिलता है: _System.Xml.Xsl.XslTransformException: एक क्लास्ट्र 'नल योग्य' 1 'प्रकार के साथ एक extention फ़ंक्शन के परम या मान प्रबंधित नहीं हैं

    और अब मैं xsl: variable का उपयोग करने की कोशिश कर रहा हूं, लेकिन मुझे कोई ऐसा उदाहरण नहीं मिल रहा है जहां वे चर के लिए मान जोड़ते हैं (क्या एक चर स्थिर एक बार परिभाषित है?)

    तो, कोई सुझाव ?

    मैं उन छात्रों को फ़िल्टर करने के लिए अपने विद्यार्थियों को एक विधेय का उपयोग करने के लिए कहता हूं, जो संख्याएं नहीं हैं।

    तो, XSLT 1 में मैं निम्नलिखित का उपयोग करेगा, जो सिद्धांत पर निर्भर करता है कि NaN! = NaN :

      & lt; xsl: value-of चुनें = 'अनुवाद (प्रारूप (संख्या (गज़ / बीएएफ / सीएच 4 | गज़ / एसटीडी / सीएच 4 | गज़ / बीएसए / सीएच 4 | गज़ / बीबीएस / सीएच 4 | गज़ / बीएचएफ / सीएच 4 | गज़ / बीन / सीएच 4) [संख्या (।) = संख्या (।)]), "### ###############"), "।", ",") '/ & Gt;   

    एक्सएसएलटी 2 में यह अधिक सुरुचिपूर्ण होगा:

      & lt; xsl: मान का चयन = 'अनुवाद (प्रारूप-संख्या (राशि (( गज़ / बीएएफ / सीएच 4 | गज़ / एसटीडी / सीएच 4 | गज़ / बीएसए / सीएच 4 | गज़ / बीबीएस / सीएच 4 | गज़ / बीएचएफ / सीएच 4 | गज़ / बीन / सीएच 4) [। Xs के रूप में योग्य: डबल]), "### ### ### ## 0 ###### "),"। ",", ") '/ & Gt;   

    (लार्स से प्रति टिप्पणियों की मरम्मत; आपको लार्स के लिए धन्यवाद।)

    command line - How to use a linux expect script to enter answer a prompt for password -


    I am having a problem writing a script which will launch my callal VPN command line client and when this signal is available Then send your password. Here is my code:

      #! / Usr / bin / expect -f set loadme "./forticlientsslvpncli --server myvpnserver - vpnuser theuser eval spawn $ loadme is expected" Password for VPN: "However, it still prompts for VPN password. That's something simple and I am quite new to Linux scripting, but any help would be greatly appreciated!  

    Thanks!

      #! / Usr / bin / expect -f set timeout-1 / CD / USR / local / forlilienslovepn spawn ./forticlientsslvpn_cli --server myhost: 10443 - VPNUUSE expects "password for VPN" for MyServer: sending "for this server" - expecting "mypassword \ r"} (w / n) \ r "{send -" y \ R "} Hope    

    windows - can't install emacs el-get package, emacs can't connect to the internet -


    I have copied it in my init.el:
      (add-to- List 'load-path ".emacs.d / el-get / el-get") (Unless (' El-Nick Neil T is required) (url- Recover "https://raw.github.com / Dimitri / el-   

    me / am / master / l-get-install.el "(get lambda (s) (end-of-buffer) (eval-print-last -sexp))) Starting emacs with this code from DAM: The .emacs.d directory which is not in the default location

      set HOME =% ~ dp0 \ .. cd .. D: \ Emacs-24.3 \ bin \ Runemacs.exe --debug-init --xrm "emacs.Background : Light green "  

    and this package should be downloaded from github, but instead I get this:

      debugger entered - Lisp error : (Error "could not create connection at raw.github.com:443") sign (error ("could not create connection at raw.github.com:443")) error ("Could not make connection to% S:% D "" raw.github.com "443) url-http ([cl-struct-url" https "zero zero" raw.github.com "zero" / dimensional / al-gate / master / l-get-install El "neil neil t neil t '(lam bada (end-of-buffer) (aval- Url-https ([CL-Structure-URL "https" zero zero "raw.github.com" zero "/ (bottom-print-last-sex)) (zero)) URL- (LIMT) re-interiors ("https://raw.github.com/dimitri/el-get/master/el-get-install.el" (Lambda (S) (end-of-buffer) ( Eval-print-last-Sexp)) (zero) zero-zero) url-retrieve ("https://raw.github.com/dimitri/el-get/master/el-get-install.el" (Lambda (S (Eval-print-last-sexp) (if (required (get the quote L-zero) zero (url-repaired) "Https://raw.github.com/dimitri/el-get/master/L-get-install.el" (function (lambda (android) (end-of-buffer) (av-print-ultimate-sex ))))) Aval buffer (# & lt; Buffer * load *> Zero "D: / .imacs.d / init.el" zero t); Load the buffer position in 1831 with the reading-code-conversion ("d: / .imacs.d / init.el" "d: / .emacs.d / init.el" tt) load ("d: / .macs  Emacs is actually trying to connect if   

    there is no information from the firewall.

    The page I recently wrote looks like the answer to this question:

    https from Emacs Does not support, as mentioned, the required DLL can be retrieved.

    • < Do not on bin to remove emacs' bin /
      • in code> dll s. Exe files, otherwise you may accidentally hit -3.0.9-w32-bin.zip .
      • You will need to restart Emacs so that they can notify the new DLS.

    jquery - How to force button, inside of parent div, in front of div. I've tried z-index to no avail -


    I was thinking that there is a fix.

      & lt; Div id = "div1" style = "position: fixed; top: 0; z-index: 1; background: white;" & gt; & Lt; / Div & gt; & Lt; Div id = "div2" style = "position: full; top: 100; z-index: 0;" & Gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Input type = "button" style = "position: fixed; top: 50; z-index: 2;" / & Gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Some text that is longer than the width of the button & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Div & gt;   

    Click the button and

    in front of and I need the button and and
    in front of and and
    But the button I am getting is & lt; Div id = "div1" & gt; is in front of the button

    I'm assuming that the reason is because buttons to and div

    code & lt; Div id = "div1" & gt; . Anyone have any idea other than restructuring?

    I am doing this so that when I scroll to the page, scroll over the top of the button text.

    The text is longer than the width of the button, so I divide the white space so that you do not see the extra text from the edge of the button.

    The answer to this question is that I confirm my doubts, but I would like a way around this. Basically I want to see in front of the button div1 and div1 in front of div1 ).

    To get the button at the top, simply position: absolute; Remove from DIV2 .

    It may break other things, which you are trying to do, but ...

    You still have can

    If you can change the .net code to change the HTML structure, then it can be easy.

    Login urls not working for google PHP SDK -


    I am trying to create a login and log out, I used the code from here < P>

    So my code looks like

        

    And I app.yaml

      application: Trial Version: 1 Runtime: php api_version: 1 thread: Right handlers: - url: / stylesheets static_dir : Stylesheets - URLs: / images static_dir: images - url: / scripts static_dir: script-url:. * Script: Mainkphp login required auth_fail_action: redirect   

    When I use Google PHP SDK 1.8.1 The app will drive local I get a lot of errors and the page does not load .

      Error: Root: With php failure (255): & lt; Br / & gt; & Lt; B & gt; Warning & lt; / B & gt;: file_get_contents (): php_network_getaddresses: getaddrinfo failed: no such host is known & lt; B & gt; D: \ google_appengine 1.8.1 \ php \ sdk \ google \ appengine \ runtime \ RemoteApiProxy.php & lt; / B & gt; On the line & lt; B & gt; 92 & lt; / B & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; B & gt; Warning & lt; / B & gt;: file_get_contents (http: // localhost: 56354): failed to open the stream: php_network_getaddresses: getaddrinfo failed: no such host is known & lt; B & gt; D: \ google_appengine 1.8.1 \ php \ sdk \ google \ appengine \ runtime \ RemoteApiProxy.php & lt; / B & gt; On the line & lt; B & gt; 92 & lt; / B & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; P & gt; Serious error & lt; / P & gt;: Do not come up with the exception of the message 'Google \ net \ ProtocolBufferDecodeError' 'does not begin in logout_url' D: \ google_appengine 1.8.1 \ php \ SDK \ Google \ Appengine \ runtime \ proto \ ProtocolMessage .php : 121 Stack Trace: # 0 D: \ google_appengine 1.8.1 \ php \ sdk \ appengine \ order \ proto \ ProtocolMessage.php (88) Google: Google \ pure \ ProtocolMessage- & amp; Gt; MergeFromString ('') # 1D: \ google_appengine 1.8.1 \ php \ sdk \ Google \ appengine \ order \ RemoteApiProxy.php (109): Google \ pure \ ProtocolMessage- & amp; Gt; parseFromString ( '') # 2 D: \ google_appengine 1.8 .1 \ php \ SDK \ Google \ appengine \ runtime \ ApiProxy.php (42): Google \ appengine \ runtime \ RemoteApiProxy- & amp; Gt; makeSyncCall ( 'user', 'CreateLogoutURL', Object (Google \ Appengine \ CreateLogoutURLRequest), object (Google \ Appengine \ CreateLogoutURLResponse), zero) # 3 D: \ google_appengine 1.8.1 \ php \ SDK \ Google \ Appengine \ API \ users \ UserService.php (95): Google \ appengine \ runtime \ ApiProxy :: MakeSyncCall ( 'user', 'CreateLogoutURL', object (Google \ appengine \ CreateLogoutURL) request), object (Google \ appengine \ CreateLogoutURLResponse)) # 4 D: \ Google Php \ in & lt; P & gt; D: \ google_appengine 1.8.1 \ php \ sdk \ google \ appengine \ sequence \ proto \ protocolLocage.php & lt; / P & gt; On the line & lt; B & gt; 121 & lt; / B & gt; & Lt; Br / & gt; INFO 2013-06-20 22: 00: 49,384 server.pySTART_STRONG3Default: "GET / HTTP / 1.1" 500 -   

    Any idea that is breaking into SDK.

    When I run the app from the server it is not creating the sign-out link no link Not made

    Compare the example:

      'Welcome,% s! (& Lt; a href = "% s"> sign out  

    with your code:

     < Code> 'Welcome,% s! (Sign out) '   

    Liferay : Any one has updated jquery.tweet.js? -


    Anyone has used and updated jquery.tweet.js for the required 6.1?

    CEOoffClauds.com,

      Important note about Twitter's API changes: Twitter has shut down its unprotected v1.0 API, so this widget is working as a 2013-06-11 has stopped. The only option for the Twitter On-Page widget is its own embedded timeline, but there are ways in which it is included in installing server-side code to support this widget. Please see this discussion for more information.   

    If so, what do I have to do? I am also trying to, if I do, then I will update.

    Waiting to answer, you can save time.

    Thanks

    < P>

    HTML>

    how did this C program execute -


    मैंने नीचे दिया गया कोड निष्पादित किया

      # include & lt; stdio.h & gt; Int main () {char ch; यदि (ch = printf ("")) printf ("यह मामलों \ n"); Else printf ("यह महत्वपूर्ण नहीं है \ n"); वापसी 0; }   

    यह कोई आउटपुट देता है "यह मायने नहीं रखता है" कोई मुझे बता सकता है कि यह कोड कैसे काम करता है क्या हुआ जब ch = printf ("") निष्पादित किया जाता है & gt;

      प्रिंटफ़ ("")   

    सफलतापूर्वक मुद्रित वर्णों की संख्या देता है। इसलिए conidtion

      यदि (ch = printf (""))   

    के रूप में विफल रहता है क्योंकि ch 0 पर सेट है। इसलिए , दूसरा क्लॉज निष्पादित हो रहा है।

    loops - Typo3 - fluid - for each newsItem.uid -


    I am using TypePro 6.0 6.0 and News System 2.0. I have a custom template that is using fluid viewchers, and I'm displaying news from my database based on my categories. So far so good, no problem.

    My problem is that I want to loop through all the news records (which are in the table, in the table), so I can use the conditions to filter which show But, till now it seems that my efforts are in vain.

    Why is this possible for loops through news categories?

        

    But when I try to loop through news item. UID, then it is not working?

      & lt; F: for each = "{newsItem.uid}" = "pub" & gt; & Lt; F: if condition = "{pub} == 5" & gt; {Pub.title} & lt; / F: if & gt; & Lt; / F: for & gt;   

    Thank you for your time.

    You mess things up (actually @shufala had told it so far).

    Each statement for each language allows you to recycle any type of archive through . In this case, every news item can be related to some of the categories , so you can iterate through each of your categories (which are the objects). Something like this is in pseudo-code:

        

    The UID is always integer in TYPO3 and it is unique, so it is not possible to iterate through, because the phonetic code looks like this (should fail):

      & lt; F: for every = "1" = "currentObject" & gt; {CurrentObject.property} & lt; / F: for & gt;   

    I do not know the news, but I think this will work:

        

    While making sure that you do not perform - nested repetition again, maybe you still have everything in the iterative of the default view?

    Edit

    As you can see newsItem list / item partially news / list -.html view ( Folder templates), so that you are not able to repeat it in partial because you only have one news obj available.

    If you want, you need to do some conditional repetition: /typo3conf/ext/news/Resources/Private/Templates/News/List.html

    webdriver - Can anyone help me with getting cucumber-jvm reporting in TeamCity? -


    I've made some big progress recently about how to integrate the CI system with source controls and more.

    One of those things is struggling to know how I am able to get better reporting about cucumber-jvm and teamcity. I have an ocean of extremely terrifying text that I see as a team entity, progress through my BDD (WebDriver) tests.

    Do anyone know / have any experience with reporting, team team with cigarette-jvm for obviously?

    I have tried the usual suspects; Google, Blogs, GuitHub Pages etc. but to no avail.

    The best I've seen is this ... but on Jenkins.

    I am definitely looking at things like reports, etc. At present. But something within the teamcity would be good.

    Many thanks!

    Use to prepare the report. To include the report of cucumber in its build config See TeamCity Custom Reports.

    java - Abstract Dao not updating or saving with Hibernate -


    I want to be in hibernation and where I am trying to save and through the institution and for the abstract Dao class I do not want to save or update, though my removal functionality seems to work in a defective way, so I was wondering if someone could tell me where I got the wrong.

    I had debug to see that this unit is actually completely full of variables when it goes to update or save. / P>

    Thanks in advance for any ideas.

    In the category where I am pulling all the data here:

      try {accountDao.add (newAccount); Return success; } Hold (exception e) {this.addActionError ("An unknown error has occurred please try to refresh the page"); Return INPUT; }   

    which goes into the Hibernate Utility class, the entity is added to the data parameter, which is called the function to be added, but it seems that hibernation will not secure it:

      Public abstract category AbstractDao & lt; Unit & gt; HibernateDaoSupport {Adds {Zero Zero (unit unit) {getHibernateTemplate ()) Save (unit); } Public Zero removal (unit unit) {getHibernateTemplate (). Remove (unit); } Public Abstract List & lt; Unit & gt; find all(); Public abstract list & lt; Unit & gt; FindById (Long ID); Public Zune update (unit unit) {getHibernateTemplate (). Update (unit); }}   

    Bean Definition

      & lt; Bean id = "account go" category = "com.dao.AccountDao" & gt; & Lt; Property Name = "sessionFactory" ref = "SessionFire" / & gt; & Lt; / Bean & gt; & Lt; Bean id = "utilityo" class = "com.dao.UtilityDao" & gt; & Lt; Property Name = "sessionFactory" ref = "SessionFire" / & gt; & Lt; / Bean & gt; & Lt; Bean id = "account_usage_Dao" class = "com.dao.Account_UsageDao" & gt; & Lt; Property Name = "sessionFactory" ref = "SessionFire" / & gt; & Lt; / Bean & gt; & Lt; Bean id = "addCustomerInfo" class = "com.action.customer.AddAction" scope = "prototype" & gt; & Lt; Property name = "account go" riff = "account" /> & lt; Property name = "utility dio" riff = "utility" /> & lt; Property Name = "account_usageDao" ref = "account_usageDao" /> & Lt; / Bean & gt;   

    Update 1: Bean definition

    I can not tell more Without seeing the implementation it appears that you are using spring this problem is usually with me when I forget to define the transaction reference.

    Take a look at this:

    php - Laravel/Eloquent - 15 Second Interval between timestamp -


    The user is trying to stop posting comments very quickly, so the plan is to use a 15 second interval .

    This query is not working to see if any comment was made in the last 15 seconds. What am i doing

    Table:

      id | Comment | Made_at | =============================================== | Blah kad 2013-06-20 18:14:17 |   

    However, I can not take enough to work with this lucrative

      // Are they commenting very fast? ('User_id', '=', $ userid) - & gt; Where ('created_at', '<', '(now,), INTERVAL $ 15 $ security = DB :: table (' comments') -> 2) - & gt; get (); If (! Empty ($ security)) {return direct :: back () - & gt; Along with the message ('Please wait 15 seconds between comments.', 'Error'); }    

    Try changing

      - & Gt; ('Created', '<', '(NOW (), INTERVAL 15 seconds)')   

      - & gt; Where ('  

    I hope this can be helpful. < / P>

    javascript - Window.open within php while loop not functioning correctly -


    I have a time loop that creates several tables with inside information. Each table has a Facebook and Twitter icon I can share a reader's information or tweet the information that is in the table through an onclick event.

    This is every event

        

    The strange thing is that it works. to some extent. When I click on the FB icon in a small window, the dialogue will pop up, the same problem for twitter is that when I look at the top header of the popup ... it is using the same information from all the tables is.

    What do I want ...

    Table 1 FB

    Table 3 .. etc etc etc

    But when I click on the icon Table 1: Window opens (GOOD)

    Table 2: Window opens ... (BAD)

    Table 3: The window opens ... (BAD)

    It looks like a simple SQL issue but when I pull the page source I

    Table 1

      & lt; Script type = "text / javascript" & gt; Function tweet () {var sharer = "https://twitter.com/intent/tweet?source=webclient&text=random title - http://www.makeupsite.com/post.php?id=39"; Window.open (Sharer, 'Sharer', 'width = 600, height = 500')}} & lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Function FBS Share () {var share = "https://www.facebook.com/sharer/sharer.php?u=http://www.makeupsite.com/post.php?id=39"; Window.open (Share, 'Share', 'Width = 600, Height = 500');} & lt; / Script & gt;   

    Table 2

      & lt; Script type = "text / javascript" & gt; Function Tweet () {var sharer = "https://twitter.com/intent/tweet?source=webclient&text=random title - http://www.makeupsite.com/post.php?id=43"; Window.open (Sharer, 'Sharer', 'width = 600, height = 500')}} & lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Function FBS Share () {var share = "https://www.facebook.com/sharer/sharer.php?u=http://www.makeupsite.com/post.php?id=43"; Window.open (Share, 'Share', 'Width = 600, Height = 500');} & lt; / Script & gt;   

    Actually the page source is saying one thing ... but window The Open is doing something completely.

    You are defining the same function again and again again. Depending on the browser, you will always define first or last tweet () or FBS-HYE ().

    In the footer of your document, set a single function:

      function share link (targetURL) {window.open (targetURL, 'share', 'width = 600, height = 500 '); }   

    After that, tie on your social buttons:

      onclick = shareLink ("[twitter URL here]");   

    or

      onclick = shareLink ("[Facebook URL here]");   

    See what I'm doing?

    Edit Whoops helps me find the correct name