Monday, 15 July 2013

php - Why are CodeIgniter application files in the public_html folder? -


Do not all files publicly see bad things?

Of course, such things /system/application/config/database.php should not be seen publicly!

Developer of CodeIgniter, Ellislabs has established this framework for ease of use. This means that people who want to try the framework do not have to brace with any permission settings on their server.

On a production server, you are absolutely right, by putting your php files in public, the HTML folder is not a good idea.

There will be a better way to organize your folders:

  • Root
    • code_igniter
      • application_folder
        • configure
        • Moderator
        • ...
      • System_foulder
      • Public _HTML
        • CSS
        • js
        • images index.php .htaccess

    To read the other changes made here, change the line 26 of index.php:

      $ System_folder = "../../code_igniter/ System-folder ";  

How to send status to the VIM status line after calling custom VIM (Python) function -


I have just created my first VIM script, I wrote it in Python. This is a simple script for switching color schemes from the directory (/ vim / etc / colors). I would like to know how to send a notification after changing the color scheme to the 'Statusline' with the name of the selected color scheme.

RSN answered my question, here is an update (

Implementation of AI and Caleb's suggestions (thanks), thanks!

  " Toggle ColorSmem 0.9 (L) 200 by Jasper Popppe & lt; jpoppe@ebay.com> "F8 and Shift + F8 Churn via ColorsCams with Nnoremap; Silent> F8>: Call Toggle Class Call toggle scheme ("- 1") & lt; CR & gt; "Chalo ji" ("1") & lt; CR & gt; Nnoremap & lt; mute & gt; & lt; s-F8 & gt; Set the directory with color schemes to cycle through: T Oggle_Color_Scheme_Path = "/ etc / vim / colors" function! ToggleColorScheme (parameter) Python & lt; endpython import vim import os paramater = (vim.eval ('a: parameter')) Scheme_path = vim.eval ('g : Toggle_Color_Scheme_Path ') colourmes = [color.split ('. ') [0] os.listdir (scheme_path) for color if color.endswith (' .vim ')] colorchemes Sort () if not vars (). If_key ('Position'): start_scheme = vim.eval ('g: colors_name') + '.vim' if 'start_scheme' in colorschemes: position = colorschemes.index (start_scheme) else: position = 0 position + = int (parameter) position% = Lennon (ColorCams) vim.command ('Colormemi% s'% Coltschem [position]) vim.command (' redraw; Echo "% s" '% colorschemes [position]) vim .command (' return 1 ') Endapthon and Function  

vim.command 'Redraw | Echo "% s" '% colorschemes [position])

to Elp echo :

redraw a later The message can disappear again and since Vim prepares most of the positions again, it does not end with the sequence of commands, it happens many times before it's "echo" Before becoming the cause of a redrone (reddraces are suspended after you do not type something), repeat it again. order. Example:

: New | Redraw | The echo is "a new window"


select - MySQL: how to get records with count > 1? -


I have one such SQL:

  SELECT *, count (*) cc Support by several groups, with help in the form, the bid order  

by CC DESC returns all records with # count.

However, what can I do if I want to achieve only> with counting 1? Select

 , count (*) from cc with manytomany support group, Spoken 1 & lt; Count (*) order by CC DESC  

How do I know if jQuery has an Ajax request pending? -


I have some problems with jquery control. I suppose you have a dropdown list that gives you the ID of that item Allows you to do what you are looking for, and when you hit enter or lose focus in the text box, it confirms through jQuery that the identity you entered is correct, shows a warning if It's not.

The thing is that when a simple user enters an invalid value in it and suppresses the focus by pressing the submit button, then after submitting the form the jQuery post returns returns.

Is there any way I can check that any of the asynchronous request processing of jQuery is due to the processing that I do not allow to submit the form?

You can use and keep track of when requests are active.


Help with rails rest standard -


I have the message controller declared as the resource in my Roots.

I want to be able to see a list of received messages and a different view of the messages sent.

But I do not want to break the rest of the pattern ... what do you think people do?

< config / routes.rb :

  map.resources: message, 

: archive = & gt; {: Sent = & gt; : Get, get: = get => : Receive}

Then in your messages_controller.rb :

  DRF has been received @ messages = message. (Current_use) Define the two dedicated scope methods sent to the end deaf @ message message = send (current_user) end  

your message.rb .

Or as Tony Fonten said:

  DIF received @ messages = current_useor.message.and ended with DEF @ message = current_User. message. End  

php - Cannot redeclare class sfconfig -


मैं Windows XP पर PHP संस्करण 5.2.11 के साथ सिम्फनी (1.2.9) चल रहा हूं।

मेरे पास एपीसी स्थापित है (संस्करण 3.0.19)

मैं एपीसी सही ढंग से काम कर रहा है यह साबित करने के लिए PHP स्क्रिप्ट चला सकता हूँ (काम करता है) हालांकि, जब मैं सिमफोनी कार्रवाई में एपीसी कॉल का उपयोग करने की कोशिश करता हूं, तो मुझे यह त्रुटि मिलती है (एपाचे त्रुटि.लॉग फाइल में):

[एपीसी-एरर] क्लास sfconfig का पुनर्वितरण नहीं किया जा सकता

तत्काल अपाचे को क्रैश करता है।

मैंने सिम्फनी sfAPCCache आवरण का उपयोग करने की कोशिश की, और फिर सीधे apc_ * कार्यों को बुलाओ - परिणाम एक ही है। क्या किसी को पता है कि ऐसा क्यों हो रहा है?

इन थ्रेड्स को चेक करें:


java - Rmi connection refused with localhost -


I have a problem using Java RMI:

When I try to run my server I am receiving, I get a connected approach (see below).

Exception occurs when the reboot method is executed:

  runtime .getRuntime (). Exec ("rmiregistry 2020"); MyServer Server = New Mysore (); Naming.rebind ("// localhost: 2020 / remote dotdoint handler", server);  

When using rmi: // localhost: 2020 / Instead of the remote dotdoint handler, it does not work either. The use of the default port also does not work. I also tried to use the IP-address 127.0.0.1, but with the same effect.

I runtime Arges:

  -Djava.security.policy = java.security Sbipradrshn  
 exception in thread "main" java .rmi.ConnectException: Connection refused to host: localhost; Nested exception is: java.net.ConnectException: Connection refused on sun.rmi.transport.tcp.TCPEndpoint.newSocket (TCPEndpoint.java:574) sun.rmi.transport.tcp.TCPChannel.createConnection (TCPChannel.java: 185) sun.rmi.transport.tcp.TCPChannel.newConnection (TCPChannel.java:171) on sun.rmi.server.UnicastRef.newCall (UnicastRef.java:306) on sun.rmi.registry.RegistryImpl_Stub.rebind (unknown source ) On . java.rmi.Naming.rebind (Naming.java:160) on be.fortega.knx.server.Main (Main.java:25) on be.fortega.knx.server.Main.main (on Main.java: java Connection connection due to .net.ConnectException :: 16) java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:333) java.net.PlainSocketImpl.connectToAddress at java.net.PlainSocketImpl.socketConnect (native resident method) (from PlainSocketImpl refused Java: 195) Java.net on java.net.PlainSocketImpl.connect (PlainSocketImpl.java:182) java.net.SocksSocketImpl.connect (SocksSocketImpl.java:433) on java.net.Socket.connect (so On java.net.Socket.connect (Socket.java:474) on socket, java.net.Socket. (Socket.java:371) on java.net.Socket) (socket.java 184) at sun.rmi.transport .proxy.RMIDirectSocketFactory.createSocket sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket (RMIMasterSocketFactory.ja va: 128) to (RMIDirectSocketFactory.java:22) on sun.rmi.transport.tcp.TCPEndpoint.newSocket (TCPEndpoint.java ---- 69) ... 7 more 

There was a similar problem with that connection exception, it is thrown when the registry has not yet started (like in your case) or when the registry Already unexpected (like in my case).

But start a small comment registry for the difference between 2 methods:

  runtime .getRuntime (). Exec ("rmiregistry 2020");  

In a new process, javas run rmiregistry.exe in bin-directory and your parallel Java code continues.

  LocateRegistry.createRegistry (2020);  

Registry starts, returns the reference to that registry remote object and then continues with the next statement.

In your case the registry has not started in time when you try to force your object


artificial intelligence - Continuous output in Neural Networks -


How can I set up a neural network so that they can accept and output continuous range of values ​​rather than discrete individuals? What do I remember from a neural network class some years ago, the activation function would be a sigmoid, which would create values ​​between 0 and 1. What should I do if I want to give the real valuable scalar to my neural network? I thought that if I want a value between 0 and 10, then I can increase the value of 10? What if I have negative values? Do these people usually do or is there any other way? What about input?

Thank you

Most of the work in the field of neural networks with continuous inputs and output Is included in the

P>

- As others have mentioned, if you are concerned about limited limitation of the sigmoid functions, you can use the non-sigmoid activation function on the output node. However, this can cause your output to arbitrarily grow, which can cause problems during training. Sigmoid activation work However, it is important to make sure that your sigmoid work is not very high: an active activation function means that the "useful" category of values ​​is small, which reduces the weight of the network. (This is primarily an issue with genetic algorithms, which uses a fixed weight modification strategy that does not work properly during small weights.)

  • Cost per multiple nodes - Multiple nodes are spreading a single continuous value to represent continuous input There is a general strategy. With the cost of increasing the size of the network, it has the advantage of providing more "features" for a network to play with it.
    • Binning - a single input is spread over multiple nodes (for example, where each node has a base function with a different center, which will be partially activated by input ).
    • Representation of binary - divide a single continuous value into 2 N segments, without losing a smooth representation, Then feed the feed in the network as a binary pattern for N nodes. This approach is compact, but it is like brittle and the result in the input varies, which changes in non-continuous manner.

servlet result display in jsp page -


How to forward the servlet output to the jsp page?

This means that the results will be displayed in JSP page.

You normally do not use the servlet to generate the HTML output. You normally use JSP / EL for this by using out.write and the ritual is considered bad behavior for broadcasting HTML content, for example:

  Secure zero code (HTPervlet request request, HTTPPreserve response response) {Object data = "Some data, a string or maybe a JavanBan"; Request.setAttribute ("data", data); Request.getRequestDispatcher ("/ WEB-INF / page.jsp") Forwarded (request, response); }  

In this web.xml, click & lt; Url-pattern & gt; Map for / page for example. To prevent direct access, place JSP in / WEB-INF . Then in JSP you can use EL () to access the Scotch attributes:

  & lt; P & gt; Data for servlet: $ {data} & lt; / P & gt; Call  

servlet by http://example.com/context/page . simple as that. In this way you control output and presentation in one place, JSP.


How to handle fragmentation of auto increament ID column in MySQL -


I have a table with an auto_increment field, and sometimes the rows are removed so auto_ignature breaks out Whether there is a way to avoid this, at the very least, how to write a SQL query:

  1. auto_increment changes the value to max (
  2. I know how to write the 1 section

  3. New Auto_increment and 2 but do I Can I put them in the same question?

    If this is not possible:

    How do I select "selection" (return) Code> auto_increment value or auto_increment Value + 1?

Renumbering will cause confusion. To record current report 99 , And if the system is hired then it can be recorded on record 98, now all the reports (and populated UI) are wrong once you allocate a unique ID , Then it is found to be stable.

Using ID fields for anything other than a simple unique number is going to be problematic. Due to a requirement for "no interval", it is incompatible to be capable of just delta. You may mark deleted records instead of being deleted. So there really is no difference that you are producing numerical invoices: You will have an unclaimed invoice with that number, instead of removing it.


C# pass int and string by reference to C++ ActiveX Control: type mismatch -


I have a problem passing the reference int or string variable through the C + + activate control. Besides, I have C ++ DLL These variations pass by context and everything works fine.

C ++ DLL:.

  __ declspec (dllexport) executed zero (LPCTSTR cmd, & amp; resultCode, LPCTSTR & message, long and receipt number in integer) {message = _T ("reply process"); Resultcode = 100; Receipt number = -1; } Public static extern executed null (string cmd, etc.): [/ p> 

[DllImport ("MyCOM.dll", charset = CharSet.Unicode) Out the int result code, outside the string message, the int receipt number out); ... int resultCode = 0; String message = ""; Int Receipt Number = 0; Execute ("CMD", resulting result, out message, received receipt number); // OK

How is this done in ActiveX control? I & amp; Reference symbol, but MIDL compiler did not allow

MyCOM.idl:.

  [id (1025315)] zero executed (LPCTSTR cmd, [outside] long & returnCode); // MIDL2025: Syntax error  

I modified ways to use signals *.

MyCOM.idl:

  [ID (1025315)] executed zero (LPCTSTR cmd, [outside] long * returnCode);  

MyCOMCtrl.h:

  // Dispat map afx_msg executed zero (LPCTSTR cmd, long * resultCode);  

MyCOMCtrl.cpp

  // Dispat map ... DISP_FUNCTION_ID (MyCOMCtrl, "execute", DISPID_EXECUTE_METHOD, execute, VT_EMPTY, VTS_PI4). Zero MyCOMCtrl :: Execute (LPCTSTR cmd, long * resultCode) {* resultcode = 111; }  

C #:

  using MyCOMLib; ... MyCOM Client = New MyCOM (); Int result code = 0; // comexception: type mismatch (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH)) client.Execute ("test order", outcomeCode out);  

The same exception is in C ++ and LPCTSTR * instead of the string type in C ++ ActiveX. Any suggestions or suggestions will be appreciated.

Resolve:

In MyCOMCtrl.cpp:

  // Dispat map ... DISP_FUNCTION_ID (MyCOMCtrl, "execute", DISPID_EXECUTE_METHOD, execute, VT_EMPTY, VTS_PI4) ...  

should be:

< Pre> DISP_FUNCTION_ID (MyCOMCtrl, "execute", DISPID_EXECUTE_METHOD, execute, VT_EMPTY, VTS_BSTR VTS_PI4) // two VTS logic

html - print out paging with css | page-break-before:always; cross-browser issue! -


I have a problem with print paging. You can see your code below It does not make a page break for print preview. (Any idea what can be the problem?

Appreciate!


HTML code

   & Gt; Header text  

Lorem Ipsum jhdfb jdhbg sdfgshdbfgkjhsdbgkjhbs d sdgf & lt; / p> div class = "pageback" & gt; & lt; / div & Gt; & lt; h1 & gt; Header Text & lt; / h1 & gt; & lt; p & gt; Lorem Ipsum jhdfb jdhbg sdfgshdbfgkjhsdbgkjhbs d sdgf & lt; / p & gt; & lt; div class = "pagebreak" & Gt; & lt; / div & gt; < / Code>


CSS code

  @ media screen {.pagebreak {height: 10px; background: url (img / page-break.jif) 0 center Repeat-X; border-top: 1px dotted # 999; margin-down: 13px;}} @ media print {.pagebreak {height: 0; page-break-first: always; margin: 0; border-top: some No;}}  

sorted !!

I moved the PageBack class to H1, and HTML tags (H1) should not be under any other HTML tag: / it is given below; Div id = "wrap"> And then I deleted all the tag covers ING H1, and it works well now! Veid !!

Your code looks correct too for me in Firefox 3.5.5 and IE 8.0 works great. I can bet that you are checking in the browser which does not correspond to CSS2 / 3, change your browser and it will work very well.

This link supports CSS3 features:

(The non-support status in the browser is depressing, is not it?)


sql - Converting an Integer to Enum in PostgreSQL -


I have created a custom data type enum such as:

  type "bnfunctionstype" In the form ('normal', 'library', 'import', 'thumb', 'adjuster_stone');  

From the external data source I get the integer in the range [0,4]. I want to convert these integers into their respective value values.

How can I do this?

I am using PostgreSQL 8.4. Select

  (ENUM_RANGE NULL :: bnfunctionstype) [S] Generation_series (1, 5) to  

cocoa - NSArray initialization with numbers -


I was thinking about how to create an NSArray with 1-100 numbers I can be used in a UIPickerView .

I know other programming classes which I can do:

  int array [100]; For (int i = 1, i & lt; = 100, i ++) array [i] = i;  

But I'm not sure how to do something similar to NSArray instead of typing all the values ​​manually, I searched it online and I used to call it Colok and it was uncertain that this was the best way, or if I can wrap anything in any way in NSNumber and every NSNumber < / Code> Go to my array and if I had to do this procedure, would I ever have to loop the Can I create a NSMutableArray and addObject running? When the user goes to the screen, I want to load these values.

Either:

  NSArray * array = [NSArray array] ; For (int i = 1; i  

Or:

  NSMutableArray * array = [[nmutabalarol] initWithCapacity: 100]; For (Int i = 1; I  

... you should do whatever you like. If there is something that you are doing often, then you might consider creating a category to build a category that creates a category.


mysql - Sending date to database with php -


Hi guys, I was wondering if you can help me if folliwng:

My Close calendar contains dates in hidden areas like this:

  & lt; Input name = "selDay_start1" type = "hidden" id = "selDay_start1" /> & Lt; Input name = "selMonth_start1" type = "hidden" id = "selMonth_start1" /> & Lt; Input name = "selYear_start1" type = "hidden" id = "selYear_start1" /> & Lt; Input name = "selDay_end1" type = "hidden" id = "selDay_end1" /> & Lt; Input name = "selMonth_end1" type = "hidden" id = "selMonth_end1" /> & Lt; Input name = "selYear_end1" type = "hidden" id = "sel Year_end1" />  

I need to get notifications for the first 3 (start date) and add them to the date of inserting them into a MSLL table. The only thing for the next 3 (expiration date) does anyone know how to combine these dates in the form of Yyyy / mm / dd?

If you need to combine it then it should work

 < Code> $ date = $ _REQUEST ["selYear_start1"] / "$ _REQUEST [" selMonth_start1 "]" / "$ _REQUEST [" selDay_start1 "];  

Use the function if you need to create a timestamp from the string

  $ date = strtotime ($ _ request ["selYear_start1"]. " / "$ _REQUEST [" selMonth_start1 "]." / ". $ _REQUEST [" selDay_start1 "]);  

.net - How to choose a WCF binding? -


डब्ल्यूसीएफ बाध्यकारी चयनकर्ता एल्गोरिदम

मैंने एक टेकएड सम्मेलन में एक बात देखी है जो कि एक सरल एल्गोरिथ्म दिखाती है एक WCF बाध्यकारी चुनना मुझे यह एल्गोरिथ्म नहीं मिल रहा है, लेकिन मुझे कुछ मुख्य विचार याद हैं:

  1. यदि आपकी WCF सेवा में गैर- .NET क्लाइंट एचटीटीपी साबुन चुनते हैं
  2. यदि आपकी WCF अन्य मशीनों में .NET क्लाइंट्स का चयन नेट टीसीपी
  3. यदि आपकी WCF में एक ही मशीन में। NET क्लाइंट होंगे तो संदेश पंक्ति का चयन

क्या कोई भी लिंक प्रदान कर सकता है इस एल्गोरिदम का पूरा संस्करण?

ऐसा कुछ हो सकता है?

मार्क


Example code for using Facebook Connect with Coldfusion -


A good example code in ColdFusion 8 shows how to use Facebook connect?

Maybe look at the one on which there is a link on which you have not made any of these efforts, but This will be a place to start.


c# - securing a clickonce update location -


I have an app that publishes and updates from a HTTP update location (I published on the host's FTP site And update from website).

The published HTML page is very easy because I can install the app anywhere on any machine, anywhere without media. The problem is, so can someone else save me the update location so that only authorized users can install the click-ins's auto-update feature without any apps?

Is this an internal application? If so, you can exclude publ.htm page from your deployment. You will then simply use the application manifest link to install, which should stop installing, it will not affect automatic updates. It may be sufficient ambiguity for your purposes.

Do not forget that you can dynamically reveal applications by using a little bit of asp.net which will only appear for your intended users. The other advantage of this is that you can isolate a small group of users while rolling out the new version.

Just one thought.


Boo - Excel Automation, trouble selecting ranges -


I am checking Boo and thought that it would try to convert some useful VB scripts that Excel (2007, in this example) a lot of things seem to be translated very easily, although I have a lot of difficulty in choosing a range - whenever I try to get them or I am a target invoice administration member Not found

  Def CreateInstance (PROGID): type = System.Type.GetTypeFromProgID (PROGID) return type () XtraDuck = CreateInstance ( "Excel.Application below) Example I have run booish A1" ") xl.Visible = True xl.Workbooks.Add sht = xl.ActiveSheet #next line as duck = duck = sht.Range (as exception RNG Throws ")  

Some things work fine, like setting the property of the name of the letter and so on, but how do I work with categories? Are there some special methods that VB hides that I need to call, and if so, how do I get them?

Cheers,

Lenny.

The range is actually a property, and this is a special property in which it works as an index, which means that it is the array- or dictionary, in most of the words, that means that you < Code> sht.Range ["A1"]
. It is syntactic sugar, and in fact it has reached like any other method, that is:

  sht.get_range ("A1", system. Reflection.Missing.Method)  

I tried to use Boo, Ruby and IronRubi to repeat my code using sentence, Chinese style and clear method call. In IronRuby, I can get it to work flawlessly, but in the only 32-bit interpreter in regular ruby, which is 32-bit app on my configuration, it also works fine 64- In Bit Interputer, the range property was never resolved correctly.

So I suspected that the Beo Interactive Shell was running in 64-bit mode and because of this the interop was unsuccessful. Unfortunately, after setting up my Local Boho Binaries to use 32-bit mode for CORFLAGS.exe, the same issue was rediscovered, so I do not think this is a real problem.

  Import Microsoft.Office.Interop.Excel Import System.Runtime.InteropServices xl_type = typeof (application) .GetCustomAttributes: Clearly with Excel DotNet Interop Library, With the Interop services namespace, so the import like (CoClassAttribute) is true) [0] .CoClass xl = xl_type () xl.Visible = true xl.Workbooks.Add  

Then :

  Xl.Range ["A1", "A2"]. Value = 12 xl.Range ["A1", System.Type.Missing] .Value = "Alpha" (xl.ActiveSheet as Worksheet). ["A1", "A2"]. Value 2 = 'whatever'  

All these things, but they essentially require you to leave "Scripty" which you use with late bondage (which is your duck Is typing).

One difference from the correct VB / VBScript for most languages ​​(except for C # 4.0) is that, generally, alternative parameters are not transparently controlled, so when you use the optional parameters (By changing with System.Type.Missing or System.Reflection equals), you will have to look at the API more carefully to deal with those methods. You can find it through Excel Interop docs, although you can use reflection to identify alternatively marked parameters if you find it easier than searching.

Because the Ruby's compulsive work is the right solution for objects, I suspect that Bo has a missing feature (or bug) in COM interop scenarios.

Edit:; The issues described in his post may also apply to bu


Jquery datetime picker plugin? -


I am using this plugin:

accept the plugin A user should have defined the start date, but I can not manage it to work

This is the title of the JS file:

var _drawCalendar = function (dateIn, A, day, month, year) {

  var today = new date (); If (dateIn == undefined) {// starting from this month. D = new date (today's gateway (), today .getMonth (), 1); Year.val (today.getFullYear ()); Month.val (today.getMonth () + 1); Day.val (today.getDate ()); } Else {// date starting date from date d = dateIn; D.setDate (1); }  

And I'm calling the Calendar Plugin with the following line, I'm really missing something, I've tried hundreds of different code snippets, but I've increased it : (

$ ('fieldset.jcalendar'). Jcalendar ();

Best Relationship, Joakim

Is there any special reason that you are not using it? The page that you link also says that the project is supersaid by the JQuery UI.


Java: Converting a char to a string -


I have done this now in Eclipse:

  string first input = remove spaces (myIn. Readline ()); String first = new string (first input. Chart (0));  

However, Eclipse complains that:

Constructor string (character) is undefined

How do I convert Can one for a string then four ??

Thanks

Edit

I tried the substring method but it does not work for some reason, but works for the method of gandalf Just fine me Very simple!

Easiest way?

  string x = 'c' + "";  

Or of course

  String.valueOf ('c');  

Mysterious trouble with escaping quotes in C# -


I have no idea that I am trying to do something very simple to start this problem , Create a string with quotation marks in it. I have no problem with it (even C #), but it is behaving a special part of the code in a weird way (at least how I find out)

  Match Time Extractor = (New Regex @ "'(? & Lt; time & gt; \ {4}: \ d {2}: \ d {2} \ d {1, 2}: \ d {2}: \ d {2}) '') .match (SQLstatement); string time = time extractor group ["time"] .toasting (); match visualctactor = (new regesx (@ "Movers \ ('(? & Lt; visit_id & gt; [\ d] +)'")). Match (escalastament); string visit_id = visitidextractor.Groups ["visit_id"]. ToString (); string s = " Select * from the measurement data, where time = \ "+ + +" \ "and visit_ID = \" + visit_id + \ ";"; queryCommand.CommandText = s;  

my problem This is my result The string looks something like the following:

"Select data from the measurements * where time = \" 2009: 11: 11 11: 11: 11 \ "and visit_ID ...."

< P> The following test code is running in any other application, resulting in the result (without backslash)

  string time = @ "2009: 11: with backslash appearing in the expression. : 11 11:11:11 "; String visit_id = @" 1279 "; Select from strings s =" measurement * "with parameters, where time = \" "+ + time +" \ "and visit_ID = \" + visit_id + " \ ";; Console; light line (s);  

These desired results are produced with or without the preceding @ sign. I am fielding with it for a while.

Adding an extra backslash, avoiding backslash and not quotes (as I believe it should) and does not escape quotes, so it does not compile.

Removing backslash behavior does not prevent quotes and will not compile once again (as I expected).

But what exactly is happening to me, I try to remove backslash with the following addition of code:

  Match Time Extractor = (New Regex (@ "'(? & Gt; {time} )). Milan (SQLstatement); String Time = Time Extractor Group ["time"]. Toasting (); Match visualctactor = (new regeses (@ "movers \ ('(? & Lt; visit_id & gt; [\ d] +)'")). Match (escalstment); string visit_id = visitidextractor.Groups ["visit_id"]. ToString (); String s = "Select * from the measurement data * Time =" "time + \" + + "\" and visit_ID = \ "+ visit_id +" \ ";" s = s.Replace ("\\" , ""); QueryCommand.CommandText = s;  

And it does nothing for the string! It still has a backslash I was doing wrong or how to go around this behavior

Thanks again for the help.

You should go with it:

  queryCommand.CommandText =" Select from "Measurement Data" + "Where time = @ time and visit_ID = @ VisitId;"; queryCommand.Parameters AddWithValue ("@time", time); query comma. parameter.advanced value ("@visid", visit_id);  

In this way you do not need to keep those quotes and This is against the attacks of SQL injection.


compiler construction - Compiling Twice with Delphi 6 and getting the same checksum on the binary -


For binary / source code validation purposes, I want to be able to compile two on the same computer 2 weeks is different And Benjamin is similar and pass some checksum tests.

So far I have found that most timestamp compilers will be written in binary. I can work around this by comparing Dumpbin / Rodta results according to this MSDN article.

Although the result is still different in about a dozen places and the difference is still, for example, some type of timestamp (varies from A1 73 to C4 76) is.

I think this is the timestamp that the Delphi compiler is inserting the code / data sections but I can not find where this is happening or how to turn it off with the different compiler / linker options. This behavior has not changed.

Any help would be greatly appreciated.

We searched this question a few years ago, and as I remembered the answer, It was only those people that people in Borland / Codegear / Embarcadero do not subscribe to the notion that the compiler should actually produce the same output given the same input (assuming that considering the current date-time input Is not acceptable for).

It's disappointing, but considering that Delphi is an irreversible major version, it probably will not change.


html - How to put text over an image without absolute positioning or setting the image as backbround -


I am trying to see if it is possible to put some text on the image without using the condition: full or image Background of an element. - The reason for the obstacles is that the HTML code is going to an e-mail, and it has been found that Hotmail does not support either.
I remember that when I first started reading CSS, I peaked around with images floating around the images, I often ended up with the text going to the image completely. Unfortunately, I can not reproduce that behavior

Full story (edited):
I received a fancy layout from the graphics designer. This is basically a good background picture, which is linked to the websites, and originally a "text goes here" area. As always, in these cases, I am using tables to ensure that everything remains in place and the crossborder + crossmailquet works.
The problem is that the middle "text goes here" is not a white rectangle, but there are some background graphics in it.
By doing some tests, it seems that live hotmail neither looks like a situation: full or background image; Relative margins are also not good as they are wasting the rest layout.

The current version works in any other mail client / website:

  ...  More recently & lt; Br> & Lt; / P & gt; & Lt; / TD & gt; ...  

Of course, "this is not possible" can be a perfectly acceptable answer, but I do not expect;)

I used to pull stents like this all the way, like when the tables came. Is really ugly, and can seriously embarrass any verifier that you run it: Overlapping the table cell, though most browsers work even without CSS.

Example:

  & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; Td rowspan = 2 & gt; & Lt; Img src = "// i.stack.imgur.com/XlOi4.png"></td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td colspan = 2 & gt; This is the overlay text & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;  

I know, for this I deserve a downvote.


database - A single MySQL query for 'bouncing' table selects -


So, ask for simplicity, I have a master table with two fields - the first is a feature and the second attribute value If the second field is set to refer to a value in another table, it is marked in parentheses.

Example:

 MASTER_TABLE: Attr_ID | Attr_Val -------- + ----------- 1 | 23 (Table 1) -> 23rd value from `Table 1`. ... 1 | 42 -> Number 42 1 | 72 (Table 2) -> 722 Price `Table 2` from 3. ... 1 | Txt -> string "txt" 2 | ... 4 | ... Table 1: Val_Id | Price -------- + ----------- 1 | Some_content 2 | .... | .... | .... | ... 23 | Some_content | ... 

Is it possible to execute a single question in SQL (without the need to parse the given results inside the application and require DB) to master MasterTable Reproduced and given & lt; Attr_id & gt; Only get attributes that refer to other tables ( like 23 (Table 1), 72 (Table 2), ... ), then the names of tables from brackets Pars (do such as Table 1, Table 2, ... ) and ( 23, 72, ... ) make a query to get the value ( Example some_content ) from that referenced table?

Here's something I did, and this parses Attr_Val to the table name, but I do not know how to specify the string and then do a query with that string. Prepare pstmt from

  "SELECT * FROM info_schema.tables where TABLESCHEMA = 'my_db_name & gt; And TABLE_NAME =? "; SET @str_tablename = (SELECT table.tablename FROM (SELECT @string: = (SELECT & lt; string_column & gt; FROM & lt; Table & gt; WHERE id = & lt; attr_id & gt;) As a string, @ Loc1: = length (@string) -locate ("(", reverse (strings)) + 2a, @ folk 2: = length (@ string) -locet (")", reverse (@string)) + 1- @ Lok 1 AS, substrate (@ string, @ public1, @ public2) AS tableline) table); & Lt; - It fixes 1 rows which are ok using pstmt @str_tablename; & Lt; - It returns 0 rows  

Any ideas? I like the purity of this approach, if pulled, but I think you should have a maintenance bomb. Are making With such treatment, who needs to be sick?

Nobody has ever said anything about a web site "Man, his data is correct!" They compliment that what is being done with the data I do not suggest that you keep your hands tied behind it on your back. I guarantee that your competitors are not.


zip - What is the best and most universal way to unzip an archive using php 5? -


I am writing software for which the user needs PHP 5, but nothing other than additional Apache modules etc. is .

Did I know:

But everyone can use PHP 5 to use it? No additional modules required? According to the documentation (Rob has said), PHP needs to compile Linux or php_zip.

almost , he said, the safest possible condition, of course, nothing to be said. So at the end of the day, this is a decision call.


java - Are there any specific requirements for a Swing component to be run in JavaFX environment? -


My company has a web application product for distribution and planning, an important part of it is the Gantt chart component where the user fixes the schedules Could. Currently Gantt Chart component is Pure JavaScript + DHTL.

I am currently looking at the possibility of going to JavaFX to get rich interactivity and generally good UI. Before we spend time learning JavaFox, this (100%) swing component is called Flexgent () and is curious to know if there are any special requirements for the swing component running in the JavaFox environment.

Thank you.

There should be no problem according to this link:

- Dirk www.dlsc.com: -)


In which order should user messages (comments/chat) be displayed? -


A typical chat widget will have a log of messages appearing in chronological order, with the most recent message below An input field is usually displayed below the log.

Comment systems, such as YouTube, may be different, some of the most recent comments appear at the top, while some show the most recent comments below. The location of the input field is also changing.

What display order / input status should be used (such as chat messages and comments) when displaying sensitive data for the time limit?

I would especially be interested in the studies of any user experience.

It depends on the case of your primary use.

Chat Model

Normally the most recent message below. This makes it easy to catch from the last point you've read. This model also applies to email (such as Gmail's interface.) In cases where usage is desirable to read sections in chronological order, I can sort messages from the oldest to the most recent (most recently at the bottom) .

Reverse Chat Model

However, for some kind of information, firstly getting the message first can be more desirable, for example, tweets

Both

If this is understood, then there is absolutely no point in reading through the history of the tweets, I order that user Let me give you a chance to do whatever they want some people can feel as comfortable as you, its ul I like to see items from T.


How to return Json from WCF Service? -


I have a template code under the AJAX enabled WCF service. What can I do to return JSON instead of XML? Thank you.

  using the system; Using System.Linq; Use the system. time. Timeliness; Using System.ServiceModel; Using System.ServiceModel.Activation; [SOPNT Compatibility Rewari (RequirementsMod = ASPNET CompatibilityRirementMode.Alvard)] Public Sector Cost Service [// HPPET GET [Operation Contract] [WebGate] Add WebGet Attribute to Use the Public Double CostOffSundWatch {Return 1.25 * Quantity; }}  

You have tried:

  [WebGet (Response format = WebMessageJason)]  

flash - applying a ColorTransform stops MovieClip from playing -


I have a movie clip that contains several layers, one of those layers is an animated background shape. Let's make this Mimovicl background Call with the size of "Makebackground" is an example of the name;

I am adding the movie clip from the action script to the forum:

  var myMovieClip = new MyMovieClip (); AddChild (myMovieClip);  

It works fine and when the movie clip is added to the stage then it is expected (Background runs).

The problem is that when I change the color to the background size, it prevents it from moving. What I am doing is inside the MyMovieClip class:

  var ct: ColorTransform = mcBackground.transform.colorTransform; Ct.color = some color values; McBackground.transform.colorTransform = ct;  

When I do this, the background is painted correctly, but it does not animate anymore, it seems that despite being stranded in frame 1, any code Later can be shown in the frame is executed. So it looks like a display problem.

What's the problem here? Is it possible to change animated shapes?

Let me know that the details are not clear and I will try to understand more.

Generally, the action attribute applied to any timeline-tone object, You can try wrapping it with clips, and apply color to that clip.


Tryig to translate C code to MIPS assembly to work on spim -


I have written a code for factual computing on C, but I want to translate it into assembly language to work on PCSPIM I am trying but how do I think ?? Can anyone help please?

C code:

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; Zero Genesis (long argument, long * result) {if (logic & lt; 2) {printf ("% ld", * result); } And {long before = argument - 1; * Result = * Result * First; Logic = first; White (logic, result); }} Int main () {long argument, answer, * result; Printf ("factorial"); Scanf ("% ld", & amp; logic); Results = & amp; answer; * Result = Logic; Printf ("% ld! =", Argument); White (logic, result); } SPIM is an MIPS interpreter, therefore you must write those processes to the MIPS assembly. 

.. you

gcc-s

, which produces assembly representations, though I suspect this architecture is limited to the GCC (potential X86.x86! = MIPS) Are running

A few weeks ago, when I had to write an MIPS assembly for my basic principles, I used the Wikipedia article and the following websites heavily:


c# - Opacity is not getting applied to the WPF Popup control -


  पॉपअप popupControl = new popup (); PopUpControl.PlacementTarget = यह; PopUpControl.StaysOpen = सच; PopUpControl.Child = नया MyUserControl (); /// मेरे उपयोगकर्ता नियंत्रण popUpControl.Opacity = 0.5; // इस कोड का पॉपअप पॉपअप कॉन्ट्रॉल के रूप में कोई प्रभाव नहीं है। आईएसओ ओपन = सच;  

यह कैसे करें?

आपको सेट करने की आवश्यकता है पॉपअप सामग्री पर अस्पष्टता।
इसलिए आपके बटन के लिए

  popup.Child = new button () {width = 300, height = 50, पृष्ठभूमि = ब्रश। ग्रे, अस्पष्टता = 0.5 // सेट अस्पष्टता यहाँ};  

javascript - Restricting a user to enter more than 7 digits before decimel and 3 after decimel -


I have to get input from a user in a text box, but I have to validate it

1 It should not take more than 7 digits before decimals.

2. After the decimation it should not take more than 3 digits

I actually found 2 parts, but The first part is still a problem, my regular expression is:

  / ^ ([0-9] {0}} + (\ [0- 9] {1,3}) $ $    

Tell me where is wrong Is

suggest a legitimate regulatory expression

You do not need Plus , And I'll use \ d instead of [0- 9] , but I do not know that it's fast:

  / ^ \ D {0}} (\. \ D {1,3}) $$ /  

The reason your regex failed is that you have to do your first test There was a later + sign, which means "one or more matches" therefore it is going to search for more sets at [0- 9] {0} Was, which will match the characters in any number before the tenth spot.


Is there any way to make Django's USStateField() to not have a pre-selected value? -


I use USStateField () from the local flavourware of Deyggo in one of my models:

 MyClass (Models.Model): State = USStateField (empty = true)  

Then I created a form of that class:

  Class MyClassForm (forms.ModelForm): Square Meta: Model = MyClass  

When I display the form, the field "state" is a "drop down" box that is "pre-selected" has been done.

Is there a way to create a drop-down box to not see any pre-selected values ​​at all?

It seems a known issue (although I am not aware of the ticket - I ask again There is no ticket for, and if not, then):

(Forms.ModelForm): Square Meta: ... YOUR_STATE_CHOICES = List (STATE_CHOICES) YOUR_STATE_CHOICES.insert (0, ('', '---------')) state = USStatefield (widget = form. (Option = YOUR_STATE_CHOICES))

from the above code.


What is the editor used for writing RFC text files? -


I'm thinking of how much effort is needed to write a text file such as page number, content table, headers, Fathers, etc. Is there something like an editor or a tax that is used to write RFC documents?

According to:

Most RFC "MS" by RFC Editor Using a very simple set of formatting commands (or "requests"), Unix is ​​processed with the "Norfolk" program macro package (see Appendix).

is an RFC that gives details about how they can use Microsoft Word: -)


c# - Dictionaries in DataTable -


I have 3 dictionary & lt; String, string & gt; Objects I have the same key as all 3:

 Dic1 Dic2 Dic3 KVKVKVA SJA IBDBEBUCCCCCDDDDDDDDDDDD DDPD Now, I would like to add these dictionaries to a datatibale, the datatale should look like this:  
 A B B DU C ARO D YTP  

How to make a hint or idea Get databases from different dictionaries?

  var dic1 = new dictionary & lt ("a", "s"}, { "B", "D"}, {"C", "A"}, {"D", "W"},} string, string> ("A", "Z"}, {"B ("A", "I"}, {"B", "O"}, {"C", "R"}, {"D", "T"}, "C", "U"}, {"D", "P"},} Var Table = New Datatelle (); Add table.column ("K", typef (string)); Add ("C1", typef (string)) table.Add column ("C2", typef (string)); Add column ("C3", typef (string)); Foreign exchange (The key to the DIC1). {Add Table RO (Key, DC1 [Key], DC2 [Key], DC3 [Key]);}  

xslt - Get the path of an element -


There is an XPath function, which returns the full path of an element, so I can use it in sth. Like:

  & lt; Xsl: if test = "path () = / root / parent / child" & gt; ... & lt; / Xsl: if & gt;  

Thanks.

If you want to test two nodes are identical, use the Generate-ID () Will be:

  & lt; Xsl: if test = "gener-id (.) = Generate-id (/ root / parent / child)" & gt; & Lt ;! - Current node / root / parent / child - & gt; ... & lt; / Xsl: if & gt;  

Generate-id () returns a unique ID for every node in the document.


optimization - configuring e-tags -


I am using Yslow as a simple speed benchmarking tool and I actually came across a misleading concept of e-tag

The main problem is that: How do I configure e-tags? My grade in YESLO says:

There are 19 components with incorrect configured entities

  * http://thehotelinventory.com/media/js/jquery.min.js * Http: //thehotelinventory.com/media/js/jquery.colorbox.min.js * http://thehotelinventory.com/media/js/easyslider.min.js * http://thehotelinventory.com/media/js / Jquery .tools.min.js * http://thehotelinventory.com/media/js/custom.min.js * http://thehotelinventory.com/media/js/jquery.validate.min.js * http: / / Thehotelinventory .com / media / images / colorbox / loading_background.png * http://thehotelinventory.com/media/images/productheaderbg.jpg * http://thehotelinventory.com/media/images/buttons/field-bg // Etc  

Developer on Website Optimization Browsing through the Yahoo.com guidelines, I can not really understand the thing with e-tags

Shows how to disable ETags for IIS and shows how to do it for Apache.


php - Where is the best place to verify form data? -


प्रश्न सरल है मुझे एमवीसी डिज़ाइन पैटर्न (ज़ेंड, सिम्फोनी, केकफीप, कोडाइग्निटर) में फार्म सत्यापन प्रक्रिया कहां रखनी चाहिए। मैं यह सवाल पूछता हूं क्योंकि मेरी अपनी रूपरेखा है लेकिन मैं तय नहीं कर सकता कि मुझे फॉर्म सत्यापन कहाँ से प्रबंधित करना चाहिए। उदाहरण के लिए, यदि मैं नियंत्रक में कथन लिख सकता हूं लेकिन यह नियंत्रक "वसा" बनाता है, या मैं मॉडल फ़ंक्शन में सत्यापन बयान जोड़ सकता हूँ (उपयोगकर्ता :: रजिस्टर (,,) में)। बेशक यह बहुत जटिल बात नहीं है, लेकिन मेरा लक्ष्य समझना है कि वे एंटरप्राइज़ स्तर के अनुप्रयोगों में कैसे करते हैं।

यदि आप एमवीसी में मॉडल को मानते हैं कि डोमेन नेटवर्क्स की बजाय नेट नेटवर्क्स कॉल देखेंमॉडल्स (और मुझे विश्वास है कि कहीं अन्य प्रस्तुति मॉडल कहा जाता है) तो मॉडल सत्यापन / सत्यापन जोड़ने के लिए एक उत्कृष्ट स्थान होगा।

यह आपको मॉडल का फिर से उपयोग करने वाले सत्यापन तर्क को पुनः उपयोग करने की अनुमति देगा, और यह समझ में आता है क्योंकि मॉडल डेटा के साथ सत्यापन तर्क को समझा जाएगा। यह मेरे लिए उच्च संयोग की तरह लगता है।

एक विवेकपूर्ण जांच के रूप में, एएसपी.NET एमवीसी ढांचा उस दिशा में भी बढ़ रहा है। चूंकि सवाल 'php' टैग किया गया है, इसलिए मुझे यकीन नहीं है कि यह अंतिम जानकारी सूचना को मजबूत या कमजोर करती है।


creating Online form builder -


Is it possible to clone a site using asp.net

I use jquery and asp Trying to make .NET, the user interface is okay,

But I will have a variable number of fields in the backend indifferent form and the variable number of fields will be saved in the database

saving- Submit retrieving management form

Q & A "itemprop =" text ">

Question: What to create a clone Is it possible?
A: Yes.

Question: Which technology should I use to achieve this technique?
A: You can use that site (below) See).
From the HTML source of the site:

  & lt; script src = "http://jotform.com/js/ prototype.js" type = "text / javascript" & Gt; & lt; / script & gt; script type = "text / javascript" src = "http://jotform.com/js/simple.js"> gt; & lt; / script & gt; & Lt; script type = "text / javascript" src = "Http://jotform.com/js/textshadow.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://jotform.com/js/builder.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "http://jotform.com/js/effects.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "http://jotform.com/js/dragdrop.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "http://jotform.com/js/jotform.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "http://jotform.com/dimmer/dimmingdiv.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "http://jotform.com/editor/wysiwyg.js" type = "text / javascript" & gt; & Lt; / Script & gt;  

HTTP header:

  Server: Apache / 1.3.34 (Debian) mod_gzip / 1.3.26.1a PHP / 4.4.4-8 + etch6 mod_ssl /2.8.25 OpenSSL / 0.9.8C X-Power-By-PHP / 4.4.4-8 + etch6  

Summary: Javascript framework: Prototype and proprietary / server-side: PHP 4.4.4 Apache 1.2.34 Server-OS: Debian Linux - Database: My guess is mySQL


sql server - A question about desining a faster algorithm in T-SQL for a CASE that I will be telling -


Here is the case

I have a SQL table that contains only one data column, in which some groups How the table looks here:

  open system sub gr open system sub gr (GM / BTIB (1111) / BTITDBL (2222) / BTVY (4444) / ACSVTYSAG basic soft sub gr basic gentle sub gR (GM / BTIB (1111) / BTUGBL (3333) / BTUGBL (3333) / BTAUSGAG main server line SYS sub-gR (GM_BTIB (1111) _BTITDBL (2222) _BTSY (5555) _ANBOSAG main server sub gr main server sub-G R (GM_BTIB (1111) _BTITDBL (2222) _BTVY (4444) _ANBVTYSAG XTM / YTM SUB GR XTM / YTM SUB GR (GM_ BTIB (1111) _BTUGBL (3333) _BTAU (6666) _BTABAG Card SUB GR (GM_ BTIB (1111) _BTUGBL (3333 ) _BTKOU (7777) _BTBKAG system dev. Deputy gR (GM_BTIB (1111) _BTSGBL (8888) _BTPB (9999) _BBASGAG individual B sub gr individual B sub-gR (GM / BTIB (1111) / BTUGBL (3333) / BTAU (6666) / As you see, some groups have duplicate names such as  
  Personal B. SR GR Individual B. SBR (I gr GR) GM / Bitiaibi (1111) / Bitiugielel (3333) / Bitiau (6666) / Bitibiaisaji  

I want to do, I have to update the short version of "Smuhnamon" Want to "more long version of them" as an example Private B GR , Personalized B SBR (GM / Bitiaibi (1111) / Bitiugielel (3333) / Bitiau (6666) / Bitibiaisaaji will look like the following after updating the table.

  Open Systems SUB (Gr GM / Bitiaibi (1111) / Bitiaiteedielel (2222) / Bitiviwai (4444) / Sisvitisag Open Systems sUB gR (GM / BTIB (1111) / BTITDBL (2222) / BTVY (4444) / ACSVTYSAG basic soft sub-gR (GM / BTIB ( 1111) / BTUGBL (3333) / BTUGBL (3333) / BTAUSGAG Basic Soft Sub Gr (GM / BTIB (1111) / BTUGLL (3333) / BTUGL (3333) / BTUsGAG Main Server Online SES SBR GR (GMBTiB (1111) _B TITDBL (2222) _BTSY (5555) _Nobosag Main Server SBR (GMTBB (1111) _BTITDBL (2222) _BTVY 4444) _ANBVTYSAG Main Server SUB GR (GM-BTIB (1111) _BTITDBL (2222) _BTVY (4444) _ANBVTYSAG XTM / YTM SUB GR (GM_BTIB (1111) _BTUGBL (3333) _BTAU (6666) _BTABAG XTM / YTM SUB GR (GM_BTIB (1111) _BTUGBL (3333) _BTAU ( 6666) _BTABAG card sub gr (GM_BTIB (1111) _BTUGBL (3333) _BTKOU (7777) _BTBKAG system god Deputy GR (GM_BTIB (1111) _BTSGBL (8888) _BTPB (9999) _BBASGAG PERS ONAL B sub-GR (GM / BTIB (1111) / BTUGBL (3333) / BTAU (6666) / BTBISAG individual B sub-GR (GM / BTIB (1111 ) / BTUGBL (3333) / BTAU (6666) / BTBISAG  

There are 9000 records in my table, and I have an algorithm that does, but it works very slowly , Like about 3 minutes to complete the query, although what I'm trying to do is something simple I need a fast algorithm.

Money for help Thanks

Resolving this set-based approach should be relatively simple:

 < Update the code> one set by a.yourfield = b.yourfield yourtable, add your tablets to an INNER B. b.yourfield LIKE a.yourfield + '%' and b.yourfield & lt;> A.yourfield  

This match pattern, but will separate a match in itself - although it is less than ideal and after this process I guess you will duplicate or remove some duplicate Nat and any other discrimination value is not something strange.


sql server 2008 - How is a spatial index represented -


I have read the documentation about spatial indices on MSDN, but I do not understand two things,

< Ul>
  • What are the keys to the index?
  • How are the sets of protected cells shown in B-trees and how they are.
  • The keys of the index should be polygon in that location (rectangular in this case) which is indexed Is being done (or equivalent, that is, they may use grid index), in this case they appear on regular, hierarchical grids.

    As stated, the 2D index is used to map to 1dB-tree. This is to provide good spatial location between the nearest index.


    java - Is it ok to instantiate an exception without throwing it? -


    Suppose I have a MyException class that is a subclass exception. I am using this class when my code contains relevant information when errors occur.

    I usually use it to wrap one of the "standard" exception classes. For example, if an error occurs during the input validation, then I will do something like

      if new (invalidInput ()) new MyException (new invalid record exception), arg1, arg2, ...) throw;  

    But my IDE (Intelligence IDEA) has warned me that it is bad despite hurting instantly without any unwanted exceptions (illegal exception in this example), but why do not I tell .

    So how is it so sinful to make an exception without throwing it? In which cycle of hell will I go?

    You can throw an instance of an exception in an illegal way. This is the case that is what it is for:

      If invalidInput ()) new invalid record exception ("invalid argument" + + "+ expected ...");  

    Or otherwise expand, exception exception instead of invalid exception, if you want to increase it with custom properties.

      Public category MyIllegalArgumentException provides an invalid extension exception {public MyIllegalArgumentException (Object AGR ...) {....}}  

    In both cases A lean, more meaningful, class model is available.

    Update: Commented about the desire to provide relevant information with the thrown exception - you can do this by supplying your custom exception object that you can do the standard exceptions. Flip Throwreak Logic like this so that: Exceptions in exceptions instead of wrapping the relevant standard, you wrap the exception in relevant standard exception .

      If invalid (InvalidInput ()) new invalid illegal exception ("invalid argument" + x + ", expected ..", new MyContextException (A, B, C));  

    (Where are the different bits of A, B & C references that you want to transmit). This way you (re) is a meaningful & amp; Appropriate, exception, at all points in the code, but you transmit the relevant information that you may want to use the stack more during settling / longing the exception.


    c++ - boost::any test code compiles with Sun CC but not g++ -


    निम्न नोड परीक्षण कोड:

      #include & lt; iostream & gt; # शामिल करें & lt; सूची & gt; #include & lt; boost / any.hpp & gt; # शामिल करें & lt; boost / foreach.hpp & gt; # शामिल करें & lt; typeinfo.h & gt; बढ़ावा :: any_cast का उपयोग कर; Std :: cout का उपयोग कर; Std :: cerr का उपयोग कर; Typedef std :: सूची & lt; boost :: any & gt; अनेक; टेम्पलेट & lt; typename T & gt; इनलाइन बूल is_any (const boost :: कोई भी और amp); वापसी (op.type () == टाइपिड (टी)); } Int main () {बहुत से सामग्री सूची; ThetrangeList.push_back ("आप वास्तव में कर सकते हैं ..."); ThetrangeList.push_back (std :: स्ट्रिंग ("1 कंटेनर में यादृच्छिक प्रकार करते हैं?")); theStrangeList.push_back (6.359); theStrangeList.push_back (7); BOOST_FOREACH (बढ़ावा :: किसी भी, thetrangelist) {try (if_any & lt; const char * & gt; (ए)) {cout & lt; & lt; किसी भी_कास्ट & lt; const char * & gt; (ए) & lt; & lt; '\ N'; } और अगर (is_any & lt; std :: स्ट्रिंग & gt; (ए)) {cout & lt; & lt; किसी भी_कास्ट & lt; std :: स्ट्रिंग & gt; (ए) & lt; & lt; '\ N'; } और अगर (is_any & lt; डबल & gt; (ए)) {cout & lt; & lt; "डबल =" & lt; & lt; किसी भी_कास्ट & lt; डबल & gt; (ए) & lt; & lt; '\ N'; }} पकड़ (const बढ़ावा :: bad_any_cast & amp; ई) {cerr & lt; & lt; e.what (); सेर & लेफ्टिनेंट; & lt; "\ N"; }} वापसी 0; }  

    सूर्य के सीसी संकलक और डिफ़ॉल्ट सेटिंग्स का उपयोग करके ठीक और काम करता है हालांकि, जी ++ का उपयोग करते समय मुझे निम्न मिलता है:

      $ g ++ -i $ BOOST_ROOT -o myany myany.cpp myany.cpp: 5: 22: typeinfo.h: ऐसा कोई फ़ाइल या निर्देशिका / आईएलएक्स नहीं है /boost_1_41_0/boost/any.hpp: निर्माता में `बढ़ावा :: कोई भी :: धारक & lt; मूल्य प्रकार & gt; :: धारक (मान मूल्य प्रकार); [ValueType = char [18]] ': / ilx / boost_1_41_0 / boost / any Hpp: 47: `बढ़ावा :: किसी भी :: किसी भी (कॉन्स्ट वैल्यू टाइप); [ValueType = चार [18]] के साथ instantiated 'myany.cpp: 21: यहां से शुरू / / xx_boost_1_41_0/boost/any.hpp:122 : त्रुटि: आईएसओ सी ++ एआरएम्स की निषेध निरोधक  

    यह जी ++ संस्करण 3.4.3 है, इसलिए यह 4.x संस्करण पर भिन्न हो सकता है, मैं इसे बाद में कोशिश करूंगा क्या ऐसा कारण है कि किसी भी को बढ़ावा देने के साथ 'is_any' टेम्पलेट शामिल नहीं है, या यह एक कंपाइलर बग है?

    अगर मैं टेम्पलेट को निकालता हूं, तो मुझे उसी परिणाम मिलता है इनलाइन फ़ंक्शन।

    लगता है कि मैंने केवल प्रश्न के दूसरे भाग का उत्तर दिया है, तो यहां मैं पहले भाग के साथ भी जाता हूं:

    क्या ऐसा कारण है कि कोई भी '' कुछ नहीं 'टेम्पलेट जिसमें कोई बढ़ावा देने के साथ शामिल है?

    कोई वास्तविक आवश्यकता नहीं है is_any , इसके बजाय निम्नलिखित करें:

      यदि (const std :: string * s = boost :: any_cast & lt; std :: string & gt; (& amp; a)) {Std :: cout & lt; & lt; "स्ट्रिंग =" & lt; & lt; * S & lt; & lt; '\ N'; } और यदि (const डबल * d = boost :: any_cast & lt; डबल & gt; (& amp; a)) {std :: cout & lt; & lt; "डबल =" & lt; & lt; * डी एंड एलटी; & lt; '\ N'; }  

    लेकिन यह एक्स्टेंसिबल नहीं है, इसके बजाय boost :: variant का उपयोग करना पसंद करता है।

    क्या यह एक कंपाइलर बग है?

    यह सूर्य सीसी में एक संकलक बग है जीसीसी सही है, "क्या आप वास्तव में हो सकता है ..." है char [18] , जो बढ़ावा देने की आवश्यकताओं को पूरा नहीं करता :: कोई भी:

    • एक ValueType है CopyConstructible।
    • एक ValueType वैकल्पिक रूप से असाइन किया जा सकता है।
    • किसी वैल्यूएट के लिए डिस्ट्रक्टर ने अप-अप-सुरक्षा गारंटी की कोई गारंटी नहीं दी है।

    javascript - JSON best practices: filtering nodes client side or not? -


    I store many "topics" and "examples" in my database. Each example is related to a subject.

    I want to show all topics in the form of a tree named ACC, except one topic (subject matter) , which I always want at the top. Although it may change later and I could not change the basic JSON output of subjects and examples from DB.

    1) Does this "Anarod List" structure seem appropriate to generate a client side (or can I already ensure that the order is appropriate in json_encode () phase?) And

    2) How do I filter a specific topic node by name in that case and index it first? Example

  • Example
  • Topic A
    • Example < Example
    • Example
  • Example
  • Your questions are very difficult to answer without knowing the exaclty, too!

    Still, in an attempt to answer, 1):

    • If you are in any way preparing a list in HTML on the server, and The list does not change, it is JSON & amp; Javascript? Use your server-side technology to do this.

    • If the list changes and you want to manage the sequence in the list in the few UI on the client and you have the idea of ​​accessibility: using your server side technology, your list and your Make Jason, order both sides, and then render your HTML list and pass your JSON to the customer. This will make the list available to the client without JavaScript and will provide a 'sort list' available for Javascript enabled clients.

    • If you do not have any worries for users, without javascript and need to rearrange the list, just pass your JSON data to your customer and render it Use Javascript to handle and re-handle.

    2) I'm assuming that you want to sort everything that is in an array? If they occur then I will use the Array.sort method:

    Some of the following should give you an idea of ​​how to do this:

      var Data: {"subject": "c", "example": [{"example": "example one one"}, {"example": "example one two"},]}, {"subject": "b "Example": "Example": "Example B.", {"Example": "Example B Two"},]}, {"Topic": "A", "Example": [ : "Example C A"}, {"Example": "Example C Two"},]}] Function SortType (Subject, First Image) {var sortedArray = {]; (Var i = 0; i & lt; topics.length; i ++) {if (topics [i] .opic == first itam) {// The first item specified is sortedArrepees (subject [ I]); Remove the elements from the original elements // (i, 1); break up;}} // Sort the remainder of the array topics. Sort (function (a, b) {if (atopic & lt; b.Topic) { Return -1;} If (ATPC & gt; BTOPC) {return1;} return 0;}); // While loop and each item (var i = 0; i & lt; topics.length; i ++) Add to new array for {sortedArray.push (topics [i]);} Return sorted Ray;} Sorttepiks (data, "C");  

    I'm not sure how the cross browser will be, and obviously you will need to prepare a list from JSON but it should start somewhere, you can make it even more common and efficient !

    Good luck.


    c# - Retrieving images using a file path stored in a sql database (nearly there!) -


    OK, I think I'm close to making a break on it.

    I have the following code, theoretically, to populate the image using a file path through a SQL database

      Public Zero Image1_Load (Object Sender, EventArgs e) {//// TLMMemberLogo code to retrieve image image - currently does not work !!! Var connectionstring = Configuration Manager Select the connection ["PDCConnectionString"]. ConnectionString; (Var cnd = cn.CreateCommand ()) (cn.Open ()) (var cn = new SqlConnection ("Data Source = STRSQL04; Initial Catalog = PDC; Integrated Security = True" Cmd.CommandText = "SELECT TblMemberlogo from LogoFilePath where member ID = '123' "; //cmd.Parameters.Add (" 1212 "," 5 "); {if reader.Read (using reader = cmd.ExecuteReader ()) }) {Var filepath = reader.GetString (0); Image1.ImageUrl = filepath; Label2.Text = filepath; now} I know that I'm close because the label returns the file path suitable for 2 member 123. However , Image1 still dangerous red cross The image code of this image control is only the following.  
      image id = "image 1" run = "server" height = "71px" width = "400px" onload = "Image1_Load" / Code>  

    Anyone who helps me finish a great pint as I am on the verge of breaking (second)!

    Please get the output out below HTML.

    img id = "Image1" src = "file: c: \ online% 20 Reporting \ SQL% 20 Solutions \ Member% 20 Logo \ 123.GIF" style = "height: 71px; Width: 400px; Border-width: 0px; "

    Unfortunately, you can not use the source of the" file: "URL Image.You need to turn that path into a valid HTTP URL.

    So if your images are in "c: \ online reporting \ SQL solution" , then you In an IIS virtual directory that is under your site root, which indicates there, maybe it's called "/ logo" or something, you can go:

    string filename = path. GET filename (rea Der.GetString (0)); Image1.ImageUrl = "/ Logo /" + filename;

    If your web root is already running, say "c: \ online" Reporting ", it is much easier - you can leave the virtual directory and simply" / SQL% 20Solutions "as the beginning of the URL.


    regex - How does the qr/STRING/ operator in Perl decide whether or not to compile STRING? -


    के लिए qr / STRING / कहना:

    यह ऑपरेटर उद्धरण (और संभवतः संकलित) उसका STRING एक नियमित अभिव्यक्ति के रूप में है।

    मुझे क्या चिंता है कोष्ठक में भाग मैं किसी भी ऐसे मामलों के बारे में नहीं सोच सकता जहां मैं इसे STRING के बाहर एक regex को संकलित नहीं करना चाहता। क्या इस भाषण के वक्तव्य में कुछ भावी मामले को कवर करने के लिए सिर्फ वेशेल शब्द हैं जहां संकलन वांछित नहीं है या आज कोई मामला है (या पर्ल के पहले संस्करण में) जहां STRING संकलित नहीं किया जाएगा

    दस्तावेज का "संभवतः संकलन" भाग शायद नीचे दिखाए गए एक तरह की स्थितियों को संदर्भित करता है, जहां

    > Qr // पहले से संकलित किए गए रेगेक्स है:

      पुनः 'डीबग' का उपयोग करें; $ Re1 = qr / foo /; $ Re2 = qr / $ re1 /;  

    उस प्रोग्राम को चलाने से केवल एक regex संकलित किया जाता है।

    उस पारित होने के इरादे से, आंतरिक विवरणों के लिए धूर्त संकेतों का विवरण दस्तावेज़ीकरण को स्पष्ट नहीं करता है। मुझे लगता है कि एक डॉक्टर पैच फायदेमंद होगा।


    c# - Threadsafe Lazy Class -


    I have class lazy which freely evaluates expressions:

    < Pre> public sealed class lazy & lt; T & gt; {Funk & lt; T & gt; GetValue; T value; Public lazy (funk & lt; T & gt; f) {getValue = () => {Lock (getValue) {value = f (); GetValue = () = & gt; value; } return value; }; } Public T-Force () {return getValue (); }}

    Actually, after trying to evaluate the object locking overhead, I'm trying to get the getValue with a second function I change with allocation.

    This apparently works in my trial, but I have no way of knowing that it will blow into production.

    Is my square safe thread? If not, what can be done to guarantee yarn protection?

    To fully function using a flag or guard value for the actual value Skip to re-evaluate? I.e .:

      Public sealed class lazy & lt; T & gt; {Funk & lt; T & gt; F; T value; Unstable bool computed = false; Zero GetValue () {LockObject} {value = f (); Calculation = true; }} Public lazy (funk & lt; t & gt; f) {this.f = f; } Public T Force (if (calculated!) GetValue (); Quantity of Return;}}  

    php - Yii: Want to separate the vendor folder from the application folder -


    I have a shared hosting server, which has been installed with multiple Yii 1.1 applications running at the same time. What I have done has been moved to the normal Wi 1.1 framework folder above the root of the web and index.php has been modified in all Yii applications to get framework files from that folder.

    But with Yii 2.0 I, I am not able to do that I modified to be transferred to the vendor folder out of the application and then index.php file point to the new location, but the dependencies Which are failing.

    Has anyone set up their application like this?

    Example

    • Folder 1
    • Folder 2
    • public_html or web Or www

      • yii application 1
      • yii application 2
    • Vendors

    In your config file you point to your new vendor A seller can specify the path to the location, therefore

      $ config = ['seller page' = & gt; 'Relative / path / to / yours / vendors / folder', 'component' = & gt; [...] // ... other configuration  

    ]

    You need to modify your composer, intending to update components using composer Is a complete description.


    python - How to get MySQL count within grouping -


    इस तालिका को देखते हुए।

    <पूर्व> + ---- + ------- + ------- + | आईडी | रंग | अनाज | + ---- + ------- + ------- + | 1 | ए | बी | | 1 | ए | बी | | 1 | ए | बी | | 2 | बी | एक्स | | 2 | बी | एक्स | | 2 | बी | जेड | | 2 | ई | ई | | 3 | ए | सी | | 3 | ए | बी | | 3 | ए | बी | + ---- + ------- + ------- +

    निम्न परिणाम उत्पन्न करने के लिए MySQL क्वेरी क्या होगा। मुझे प्रत्येक आईडी के भीतर रंग / अनाज संयोजन की अनूठी घटनाओं की संख्या की गणना करने की आवश्यकता है।

      + ---- + ------- + ------- + ------------------- + | आईडी | रंग | अनाज | रंग / अनाज की गिनती | + ---- + ------- + ------- + ------------------- + | 1 | ए | बी | 1 | | 2 | बी | एक्स | 3 | | 2 | बी | जेड | 3 | | 2 | ई | ई | 3 | | 3 | ए | सी | 2 | | 3 | ए | बी | 2 | + ---- + ------- + ------- + ------------------- +  

    यह मेरी वर्तमान क्वेरी है, लेकिन यह उस गिनती का उत्पादन नहीं करता जो मैं देख रहा हूं। गिनती के अनुसार ग्रुप की घटनाओं के लिए गिन है, आईडी के भीतर अनन्य घटनाओं को नहीं।

      आईडी, रंग, अनाज आदेश से तालिका समूह से आईडी, रंग, अनाज, गिनती (आईडी) का चयन करें आईडी द्वारा; तालिका समूह से आईडी, रंग, अनाज, गिन (*) का चयन करें  

      आईडी, रंग, अनाज के द्वारा  

    यह पैदा करता है:

      आईडी का रंग अनाज गिनती 1 एबी 3 2 बीएक्स 2 2 बीज़ 1 2 ईई 1 3 एबी 2 3 एसी 1  

    कौन सा लगभग है अब आपको आईडी से अलग रिकॉर्ड की संख्या दिखाने के लिए इसे बदलने की जरूरत है, इसलिए हम उप-क्वेरी का उपयोग करके ऐसा कर सकते हैं:

      x.id चुनें, COUNT (*) से (चयन करें) आईडी, रंग, अनाज, आईडी, रंग, अनाज द्वारा #table समूह से COUNT (*) सीएनटी) x xid द्वारा x समूह  

    जिसके परिणामस्वरूप:

      आईडी संख्या 1 1 2 3 3 2  

    अब, विस्तारित परिणाम प्राप्त करने के लिए, इसमें शामिल हों:

      a.id चुनें, a.color , A.grain, b.cnt से (आईडी, रंग, अनाज, आईडी (आईडी), रंग, अनाज द्वारा #table समूह से COUNT (*) सीएनटी) एक सम्मिलित करें (चयन करें x.id, COUNT (*) cnt से (चयन आईडी , रंग, अनाज, iT द्वारा #table समूह से COUNT (*) सीएनटी डी, रंग, अनाज) x.id द्वारा x समूह a.id = b.id  

    जिसके परिणामस्वरूप:

      आईडी रंग अनाज सीएनटी 1 एबी 1 2 बीएक्स 3 2 बीजेड 3 2 ईई 3 3 एबी 2 एसी 2   

    javascript - Ractivejs on-click events cannot be found when in array -


    परिदृश्य: मेरे पास 4 बटन हैं: एक निश्चित ऑन-क्लिक इवेंट, एक अन्य गतिशील घटना के साथ ractive संपत्ति पर आधारित है, और फिर ऑब्जेक्ट्स की सरणी के भीतर 2 और इवेंट कॉन्फ़िगरेशन है, जैसा कि आप इस कोड में देख सकते हैं।

    डेटा:

      डेटा: {"नाम": 'विश्व', 'पाठ': "नमस्ते कहो", "मुख्य ईवेंट": "कहना हेलो", बटन: ["पाठ": "हेलो इन एरे", "बटन एवेन्ट": "कहते हैं"}, {"टेक्स्ट": "अरे अरे ऐरे 2", "बटन एवेन्ट": "sayHello"}]}  < / प्री> 

    टेम्पलेट:

      & lt; div class = "buttons" & gt; यह गतिशील है, काम नहीं करता है & lt; a href = "#" पर क्लिक करें = "{{mainEvent}}" वर्ग = "बटन प्राथमिक" & gt; {{text}} & lt; / a & gt; & Lt; br / & gt; यह हार्डकोड है, यह & lt; a href = "#" पर क्लिक करें = "sayHello" class = "बटन प्राथमिक" & gt; {{text}} & lt; / a & gt; & Lt; br / & gt; {{#buttons}} यह सरणी में गतिशील है, यह काम करता है & lt; a href = "#" पर क्लिक करें = "{{buttonEvent}}" वर्ग = "बटन प्राथमिक" & gt; {{। Text}} & lt; / एक & gt; & Lt; br / & gt; {{/ Buttons}} & lt; / div & gt;  

    1 और 2 बटन को कोई समस्या नहीं है, लेकिन किसी भी तरह, आरएपी पिछले 2 बटन के लिए गतिशील घटना नहीं मिल सकता है जब वे सरणी में कॉन्फ़िगर की जाती हैं।

    यह एक ractive त्रुटि? कैसे काम करने के लिए एक सरणी में बटन हो सकता है? मुझे बटन की डायनेमिक सूची सेट करने की आवश्यकता है जिसमें घटनाएं भी गतिशील कॉन्फ़िगर हैं I धन्यवाद।


    How to get this jSON data from API with Javascript / AngularJS -


    I am working with json, an API, and ajirs. I want to get the following data, but I will not know in advance how the keyword or date will be

      {"Landscape Gardening Middlesex": {"2015-02-12": {"Status "," Change ":" n / a "," class ":" gray "}," 2015-03-17 ": {" position ":" 0 "," change ":" n / a " "Square": "Gray"}}, "Landscape Gardening Staines": {"2015-02-12": {"Status": Zero, "Change": "n / a", "class": "Gray" "2015-03-17": {"Status": "94", "Change": "n / a", "class": "green"}}, "Landscape Gardening Surrey": {"2015- 02- 12 ": {" "Change": "change": "n / a", "class": "green"}, "2015-03-17": {"position": "0", "change" ":" N / a " "Class": "gray"}}  

    } I can get it using AngularJS ng-repeat thanks.

    Create a Javascript T object and place it somewhere ... you can always strip it Parsing it again

      var myJSON = {name: "bill", Skill: ["coding", "sleep" "food"], age: 25}; // This string can be stored anywhere, such as a string in mySQL; Var string = JSON.trinfar (marijasan); /// JSON obj var newJSON = Turn back to JSON.parse (string); Console.log (newJSON.name); // & gt; & Gt; "Bill"  

    /// Hope that helps


    Javascript Time Function Issues -


    html5 is having trouble entering a text box and writing a javascript function that will ensure that the entered Time is not less than 30 minutes from the present time. How to get the current date mainly, my biggest concern is whether it will be as simple as the date. Now add (30 minutes) and then 30 minutes?

    i have recently used moment.js for a project .. is that really something good Methods of time ...

      //// Get today today vir now = (new date ()); /// In a JavaScript Date Object view, look for ways that they try to list console.log (Object.quiz (now));  

    moment. Give Google a Google, making the difference between 2 dates easier.


    Common Lisp: Replace IF with AND & OR? -


    I'm stuck with the exercise 4.28. Symbolic calculations from a gentle introduction of the book (p. 129):

    We can usually rewrite this simple plan and rewrite it as a combination of more: IF Test true false-part with equivalent expression (or test the right part ) false part ) But why is this plan unsuccessful for the expression (if ODDP5) (FPN) fails to 'FU'? If suggesting more sophisticated ways to re-write in the form of a combination of ANDS and ORs that do not fail.

    (and (and oddp 5) (or (7)) evaluates and stops 'FU' true part , And it will evaluate false-part if test was zero, but it always tends if test is t, that if Does not reflect the behavior of what has been learned in this book so far, is the correct solution to this problem, or is the answer to this exercise that there is no one at this point?

    Do not say for the sake of if there is one, then do it for me to continue looking for one. Exercise for that.

    apache - Apache2 ViritualHost defaul -


    I have a domain on my Ubuntu 14.04. Apache works well on all my domains that are on a domain. It shows me the defect page on that domain.

    Here is my .conf file, and all other files are synced in this way, but do they prevent this problem ??

      server admin drift@keber.no & lt; VirtualHost *: 80 & gt; Servername keber.no ServerAlias ​​www.keber.no DocumentRoot /var/www/sites/keber.no & lt; Directory /var/www/sites/keber.no/> Allow all cancel orders, allow all & gt; Directory & gt; & Lt; / VirtualHost & gt;  


    How to resize animation in libgdx? -


    I want to draw an animation, each frame size is 500x500px, but when I try to resize, the animation Rotates ...

    Code here to create frames and create animation: Texture = new texture (Gdx.files.internal ("fire_sheet.png")) ;

    Texture Ration [] FireForms = New Texture [4]; FireForms [0] = new architecture (fireshot, 0, 0, 0, 500); Firefram [1] = New Texture Desert (Fireshot, 700,01200,500); Firefram [2] = New Texture Desert (FireShare, 1450,0, 1, 150, 500); Firefram [3] = new framework (fire cooler, 2250,0, 2750,500); Fire animation = new animation (0.5f, fireframe);

    In the draw method, I resize the animation like this:

      Public Zero Draw (batch batch, float parent alfa) {batch.enableBlending ( ); StateTime + = Gdx.graphics.getDeltaTime (); CurrentFrame = Assets.fireAnimation.getKeyFrame (statetime, true); Batch.rara (currentframe, getX (), getY (), 200, 200); }  

    So if I use it:

      batch.drau (current frame, getX (), getY ()); // Works !!! But if I use it instead of a big 500x500px  

    for me:

      batch.draw (current frame, getX (), getY () , 200, 200); // animation does not work properly  

    What can I do?

    Thanks in advance

    Try this as a test (estimation of 500 Imposing is the size of your original texture): batch.draw (currentframe, getX (), getY (), 0, 0, 500, 500, 0.4 f, 0.4 f, 0);

    Tincture of clots


    How to 'pull' content used in Marketo email marketing campaigns to a portal, what are the options? -


    I would like content to be used in a portal in marketing e-mail marketing campaigns so that we can publish news / content etc. To display. .

    I have collected that it can not be done with API, what other options can be used to pull or drag content to our portal?

    Post-text "itemprop =" text ">

    is the beta asset API (REST) ​​that allows you to recover the HTML of the email. You can search for emails, their metadata You can retrieve the email and download the HTML of the email. Contact the technical support to ask to add to the beta program. Since it is a beta program, so there is no support yet. Last at the end of the year (I do not know the exact time), so you can also wait for it.


    apache - I am trying to block a kind browser with RewriteCond %{HTTP_USER_AGENT} -


    This browser recognizes the Apache log

    "Mozilla / 5.0 (Windows NT 6.1; RV: 31.0 Gecko / 20100101 Firefox / 31.0 "

    What should be the correct syntax?

    Rewindcore% {HTTP_USER_AGENT} "Mozilla / 5.0 (Windows NT 6.1; RV: 31.0) Do not match exact on user agent because it may be slightly different and the test is the same browser Version will be unsuccessful. To exclude Firefox version 31, simply log on to the substring

      revised code on the revised version% {HTTP_USER_AGENT} \ Firefox / 31 [NC] ^ - [F, L]  

    Now, the browser receives 403 forbidden error You can.


    Using Python 2.7 To Stream Video In A Web Browser. -


    This is my first time asking a question, so I'll jump right in and hopefully I work correctly I am here. I searched through Google and through the board and resources during streaming, I do not seem to answer my question.

    Brief version: I would like to setup a Dragon 27 handler for streaming video in a web browser, we currently have to do this with PHP using Adobe FMS on a series of Linux servers. There is a way.

    Long version: My company uses the internal web streaming page which is currently setup using PHP. We want to move away from PHP as a handler for this and we've found that Python will accomplish this task with my problem? I'm not a web developer. I do not know the first thing about integration of py files in html.

    I have written software written in Windows and Linux before and I played with the video using Pyramid (There is nothing serious). In addition, I have asked resources to use the flask to set up streaming but my brain can not make it head or tail and it does not actually click for me if it is any It is a matter of pride

    Has anyone started such a project, and can suggest a website, tutorial or article that can help in more detail?

    I can clarify or answer any question which can help you answer this question further in detail.

    As I understand:

    1. Allows the user to interact with the front end media player.
    2. The user will click on a playlist item and it will send the input through the python handler to start video processing from our FMS cache.
    3. The user sits down the bench, grabs a Capri, and enjoys very boring lectures and award ceremonies that we host.

    Thank you very much for your help!

    In this tutorial and its creative gitb page, we do not get any help like at least LAN In doing so we do this easily, how to stream on the Internet, even I am trying to find out. It is believed that this includes port forwarding.

    Just download the zip and follow the steps:

    Install Python dependencies: cv2, flask.

    Run: Python main.py

    Navigate the browser to the local webpage.


    c# - WriteableBitmap.Render changing color in the image -


    So I'm trying to save a user's control to use a png as a tile. Code which I am using

      category class = new category (); Sq.Measure (new size (336,336)); Sq.rrange (new rectangle (0,0,336,336)); RenderExtensions.SaveToFile (class);  

    and RenderExtension class looks like this

      public static class RenderExtensions {SaveToFile (this UIElement visualTreeElement) {WriteableBitmap WB = new WriteableBitmap bool public static ( 336, 336); Wb.Render (visual perimeter, blank); Wb.Invalidate (); Return wb.SaveToFile (); } Public Static Bull SaveToFile (this writeable bitmap rendertrainbillmate) {try {string fname = "shared / ShellContent / SquareTile.png"; // StorageFile liveTileImageFile = localFolder.CreateFile ( "/ share / ShellContent / SquareTile.png", CreationCollisionOption.ReplaceExisting); Extended image ei = new extended image (); Byte [] results = new byte [rendertigitbitmap. Pixel Length * size]; Buffer.blackcopy (rendererbitmap pixel, 0, result, 0, result. Length); Ei.SetPixels (336,336, results); If (Ei! = Null) {IsolatedStorageFile isf = isolated storage file.NetusourceStoreFirection (); (Using Isf) (if (! Isf.DirectoryExists ( "share")) {isf.CreateDirectory ( "Share");} If (! Isf.DirectoryExists ( "Shared / ShellContent")) {isf.CreateDirectory ( " Shared / ShellContent ");} if (isf.FileExists (fname)) {isf.DeleteFile (fname);} using (var stream = new IsolatedStorageFileStream (fname, System.IO.FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare. ReadWrite, ISF)) {ei.WriteToStream (stream, fname); stream.Close ();}}} true;} catch (exception ex) {return false;}}}  

    Now the tile looks like this (note background color has some transparency) Enter image details here

    And if I'm one in a grid To add Mr. UserControl, it really https://i.stack.imgur.com/piLT0 the enter image description here

    Here is the original image that is showing this user control

    Enter image details here

    You can see how Lal has made a blue color, although the image is not transparent. Why is this happening?

    Update: I also tried a different image, in which only three colors are red, blue and yellow, only red and blue are changing.

    OK I have managed swap using red and blue, this function

     Private Static Byte [] Convert Array (int [] Array) {Byte [] New Array = New Byte [Array. Height * 4]; For (int i = 0; i and lt; array langith; i ++) {newer [i * 4] = (byte) (array [i]> gt;> 16); NewRay [i * 4 + 1] = (byte) (array [i]> gt; & gt; 8); NewRay [i * 4 + 2] = (byte) (array [i]); Newer than [i * 4 + 3] = (byte) (array [i]> gt; 24); } Return Nuere; }  

    Now I am not using

      Buffer.BlockCopy (renderTargetBitmap.Pixels, 0, results, 0, result.Length);  


    jquery - html file 2 time browsed 3 time browsed when page is not refreshed -


    I have a link on that link that I am browsing the input type file, for the first time I upload the file Using AJAX is working fine, but when I upload a new file twice or 3 times on the next upload, how many files I browse in the last (first) upload. I want to reset the file when I reload the wall while posting. / P>

    These are html and java script code below: -

      input type = "file" id = "uploadfile" name = "uploadfile" style = "display: none ; "Value =" "/> & Lt; Script & gt; $ ('# Applus') Click (function (e) {$ ('# uploadfile'). Click (); $ ('# photo_video') Show (); return returned;}); $ (Document) .ready (function () {$ ("# uploadfile"). Change (function (e) {$ ('# img_upload_process'). Show (); var file = document.getElementById ("uploadfile"); Var filen = document.getElementById ("uploadfile") .pir; var fff = file.files [0]; formdata = false; var formatta = new form data (); formadata .append ("upload", file.files [0 ];;); If (file) {$ .ajax ({url: "upload.php", type: "POST", data: formData, mimeType: "multipart / form-data", contentType: false, cache: false, ProcessData: incorrect, success: function {$ ('# response image'). Attachment; var duplicate CHk = {}; $ ('input [id]'). (Function () {if (duplicateChk .hasOw NP Roperty (this.id)) $ $ (this) .remove ();} and (duplicate Chk [this.id] = 'true';}}); $ ('# img_upload_process') to hide (); $ ("# Uploadfile") value (""). Document.getElementById ("MyForm") reset (); $ ("# MyForm") [0] .reset ();}})}}})}} ; & Lt; / script & gt;  

    To pause commands at the end of each link Try


    mongoose - mongodb: how to automatically generate an id to a newly created object? -


    I am creating a new object with Mongoos, how to automatically specify an ID for that object?

    This is what I have done so far (see: coffeescript):

      ObjectSchema = new schema ({#some else property ID: {type: Schema.ObjectId , Essential: true}})  

    In this way I am creating this:

      obj = new object () # some points obj.save ( (Mistake) -> If the mistake is? Console.log (err) else console.log ("Successfully Saved"))  

    which gives me this error:

      Validation Error: Path requires `id`  

    Any id fee in your schema No announcement of D, and then save, a _id Otogenerted field in your object.


    python - Deploying Flask App to Heroku - ImportError Flask not found -


    I have some experience with Python flask, but only local development has done. Now I'm dragging on to try some flask projects on the Web with Heroes, but I'm having difficulty in deploying a basic HelloWorld flask app for everyone right now my problem is That it is not processing the right requirements.

    My profile looks like this:

      Web: Python hello.py  

    and my hello.py file looks like this Is:

    Import from the flask import flask app = flask (__name__) @ app. Root ('/') def Hello (): Return 'Hello World!'

    I have an updated version of the requirements.txt generated from the PP freeze; Necessities.txt with the flask in it, but when I write myoku ps in the toolbail command line, it crashes and logs me in:

      myoku [Web 1]: The process of starting with the command 'Python helloop' app [web 1]: import error: a module called flask app [web 1]: traceback (most recent call final): App [Web.1]: From Flask Hecoco [Web 1]: The state was initially replaced by crashing  

    Ruti how seems to inhibit the successful deployment, which is fine, and when applications come online on the site, so I'm obviously going to the application met with an error that can not serve my application.

    Due to any consideration, the processing of requirements is not working properly?

    thanks

    Edit:

    Add requirements.txt:

      flask == 0.10.1 more than it is == 0.24 Genza 2 == 2.7.3 MarkupSaffe == 0.23 Verkejeug == 0.10.1  

    To remove capitalization from flasks, flask in requirements.txt? But what does this always work for me?


    java - IBM Connections, receiving "400 Bad Request" error while trying to unfollow a user -


    I am trying to use the IBM Connection API and want to stop one user after profile with the following API .

    I'm getting a "400 bad request" error.

      Public class StopProfile {public static zero main (string [] args) {try {SocketFactory factory = SSLSocketFactory.getDefault (); Socket socket = factory.cent socket ("greenhouse.lotus.com", 443); OutputStreamWriter Out = New OutputStream Water (socket .getOutputStream (), "UTF8"); Out.written ("post / profile / follow-up / atom / resource? Source = profile http / 1.1 \ r \ n"); Out.written ("HOST: server name \ r \ n"); String Encoding = New String (base 64. Exodbase 64 ("Username: Password" .getBytes ()); Out.written ("authorization: basic" + encoding + "\ r \ n"); String Data = "& lt; Entry xmlns = \" http: //www.w3.org/2005/Atom \ "xmlns: AP = \" http: //www.w3.org/2007/app \ "xmlns: SNX = \ "Http: //www.ibm.com/xmlns/prod/sn \" & gt; \ n "+" Category duration = \ "resource-follow-up \" plan = \ "http: / /www.ibm .com / xmlns / prod / sn / type \ "& gt; & lt; / category & gt; \ n" + "& lt; Category duration = \" Profile \ "scheme = \" http: //www.ibm.com/xmlns/ Prod / sn / source \ "& gt; & lt; / category & gt; \ n" + "& lt; Category Period = \" Profile \ "plan = \" http : //www.ibm.com/xmlns/prod/sn/resource-type \ "& gt; & lt; / category & gt; \ n" + "Category duration = \" 4f520868-ac2a-40bd -98da-a24e5227f529 \ "Plan = \" http://www.ibm.com/xmlns/ Prod / sn / Sons Money-ID \ "& gt; & lt; / category & gt; \ n" + "& lt; / Entry & gt;"; outside. Type ("content-length:" + data. Length () + "\ r \ n"); Out.write ("content-type: application / atom + xml; charset = UTF-8 \ r \ n"); Out.write ("\ r \ n"); Out.write (data); Out.flush (); BufferedReader = new in BufferedReader (new InputStreamReader (socket.getInputStream ())); String line; While ((line = r. rummy ()) = null) {System.out.println (line); }} Hold (exception e) {System.out.println ("exception" + e); }}}  


    kernel32 - GetPrivateProfileString returning no values :VB.net -


    I am new to VB and working on VB6 on VB6 migration. One of the solutions has been successfully migrated and the other one is working on. ("WinFlex", "UserPath", "", Temporarily) as the slow-integer = GetPrivateProfileString (1024) in the form of a slow temporary New System.Text.StringBuilder (1024) Public Sub Main () , 1024, "C: \ WINDOWS \ win.ini") End Sub & LT; DllImport ("kernel32") & gt; _Private Function GetPrivateProfileString (ByVal section string, as byVal key string, as def string, ByVal retval as System.Text.StringBuilder, ByVal size integer, ByVal FilePath string as in the form of as ByVal ) As the integer end function

    This special code (temporary) needs to return a functional directory for my INI file (like some "C: \ WinFlex6 \ 1 "), but instead it gives me an empty value Is returning. The same code works on a different solution (someone else migrates it). I'm not sure what the problem is. I tried to fix several fixes on the web, but none worked.

    Can anyone help me on this?

    Earlier it was working fine, but after some debugging stop working.

    Sorry guys, I'm naive in vb so was making this silly mistake. . Thank you for bringing this

    The issue was, I was declaring / function in a module

     . & Lt; DllImport ("kernel32") & gt; _Private Function GetPrivateProfileString (ByVal section string, as byVal key string, as def string, ByVal retval as System.Text.StringBuilder, ByVal size integer, ByVal FilePath string as in the form of as ByVal ) As an integer end function  

    This function can be "shared function" which can be added to a class.

      public shared function  

    I declared it as a vb square inside

       

    bingo! It worked! Thanks again!