Posts

Showing posts from May, 2014

javascript - HTML: select default option when select tag holds a function -

I have this dropdown: & lt; Select & gt; [_Perl function that creates and gives options]] There are only two options, current and previous, but the perl code "omits" option omits. PRL Return "Option VALUE = \" $ item \ "SELECTED> $ item Where $ item is a entry in a dynamically-built list. I have already asked if I can change this very complex design, but I do not have permission, I want to throw some JS on it, though, I do not know how with Pearl Have a conversation. I found that you can hold the DOM element and in this case, the current or Set in the previous and it is not enough to add another option to your smartphone. It turns out that I did not have to deal with Pearl at all. Onkidown in a text element I wanted to define to choose, my JS looks function defaults turned on (& lt; Domamement.name & gt; ) {If (& lt; DOMelement .name & gt; == "& lt; specific state as first & gt;") {var ...

sharepoint - Search Service is not found in TFS WSS3.0 SP2 version -

Image
I am trying to configure the search service on WSS 3.0 which is installed with TFS 2010. I do not see in the search service "server in form" without it I can not do anything I used "in the service" Tried to start the service, I got an error. SharePoint version The one that comes with TFS is SharePoint Foundation. The SharePoint Foundation does not include the search service. You will need SharePoint standard or enterprise.

Increment value in twig file -

I have a loop with a .twig file that outputs elements. I have to increase a value with each element. I know how to do this in PHP, but it does not explain how to do it with a twig document. Any suggestions I really can not do in the controller? {/ MyVal = myVal + 10}} {% endfor%} use it : {% set myVal = 50%} {% for item in item}%} {% MyVal = myVal + 10%} {% endfor%} , you set {%%} to set prices, set blocks / forms, etc. For output, {{}} is

mysql - Alter table with new default failing -

I am trying to update a table and change the default value for 0 on two columns instead of zero . The problem is that the reverse command fails because there are no empty values ​​for those columns in many rows. Is there any way I could change the command and if it comes in a row with a zero value in an order set to 0? I can use a query to update rows with zero values, but I want to be able to run a command command using Percona Toolkit which will allow for online alter table commands. null values ​​to 0 Will have to change. Update Code> your_table set col = 0 where the kernel is redundant; Change table to change your_table kernel int not zero default 0;

magento - Defining and working with global object for codeigniter controller -

Hello I'm just working with Magento Soap Clint and I am creating a lot of functions within a controller And that's why I want to set $ client and $ session_id in global form. This is my code - // Stop all error reporting error_reporting (0); // with SOAP client is required APPPATH.'third_party / client / soap_clinet.php '; // class API class extends your CI_Controller { // public variable public $ variable = "tree"; // work fine // Define the client object as the following error is also made. public $ client = new SoapClient ('http: // localhost /mystore/index.php/api/?wsdl'); Public $ session_id; Public function _ composition () {origin: _ creation (); } Function index () {$ data ['title'] = "SOAP"; $ Data ['title'] = "showing magteo soap connectivia"; $ This- & gt; Load-> View ('upview', $ data); } // I need help for this function function login () {{$ thi...

asp.net - C# exporting csv with incorrect column format (Excel) -

Image
I am exporting gridview data in a CSV file, one of the columns contains a coupon number which is 18 Points long, non floating point The number needs to be displayed in the Excel form of its full number as CSV file when I open the CSV file in Excel , for example , 720137994699937608 and others are shown as: Then when I change the column size or change the column type for the number, the coupon number displayed in this form Is given: You will see that Excel has been changed, coupon number in a floating point number and now the number within the coupon number has been changed with zero in the end. that's horrible. Here is my export code: Secure void btnExport_Click (Object Sender, EventArgs e) {Response.Clear (); reaction. Buffer = true; Response.AddHeader ("Content-Properties", "Attachment; File Name = All Prizes.csv Reports"); Response. Charset = ""; Response.ContentType = "csv"; Stringbilder sb = new stringbiller ()...

html - printf span long command over multiple lines -

Is it possible for long printf commands spread over many links? My command is something like that, and I would like it to be more readable. The breaks are there because it is the only part of the awk block. select sqlite3 -noheader-column database.db "* tbl_a range from $ range *" | \ Awk 'BEGIN {FS = "|"; } {Printf "\ t \ t & lt; tr & gt; \ n \ t \ t \ t & tt; td class = \" d \ "& gt;% s & lt; / td & gt; \ n \ T \ t \ t in awk , you can line-string several Continuity character to split into lines. sqlite3 -noheader-column database.db "Select * to tbl_a limit $ limit" * | Awk 'BEGIN {FS = "|"; } {Printf "\ t \ t & lt; tr & gt; \ n \ t \ t \ t & tt; td class = \" d \ "& gt;% s & lt; / td & gt; \ n \ T \ t \ t or, awk , you can process sqlite line-by-line output in bash Are: Select / P> sqlite3 -noheader-column database.db "...

android - Take screenshot method inside Fragment -

I'm trying to work this code inside a piece. This code runs fine inside an activity, but I can not do it to work inside the piece. When I click on a button, this tells the Lecturanshot method. Code for this screenshot: Public Bitmap LaserSot () {see Routview = AddressWebID (android.R.id.content) .getRootView (); RootView.setDrawingCacheEnabled (true); Return rootView.getDrawingCache (); } Due to being in this one piece "findViewById" has not been identified. I have tried: View root view = GetView (). FindViewById (android.R.id.content) .getRootView (); But this is not working either I got 07-25 09: 37: 32.746: E / Android Random (31221): surplus exception: the main 07-25 09: 37: 32.746: e / Android Rentaim (31221): Java lang.NullPointerException 07-25 Sept: 37: 32.746: e / AndroidRuntime (31,221): 37 :: 32.746: e / AndroidRuntime com .dream3ncore.thefinalwordcounts.level01.Song01.takeScreenshot (Song01.java:763) 07-25 September (31,221): 37 :: 32....

cpython - How to use shared dynamic libraries with python-cffi (in linux)? -

OS: CentOS 6 (64bit) I have a dynamic library (.so) in C And I want to make an abstract layer of Python on it and then use it to implement my argument. I have decided to use CFFI for it because it does not deal with any type of DSL (Domain Specific Language). Some things I wanted to know: Is there a good starting point to do this (using CFI using loading and dynamic libraries) Can I mention? Docs on the official site talk about this, but I was seeing some concrete references with some examples. Thanks two good starting point: My CFFI example repository: Between the two you should not have too much trouble collecting your cover. And on your second question: If the shared library which you wrap is very simple (eg, some function calls, simul data structure) you may find simple (because it is part of the standard library) .

SignalR Error loading hubs. How to handle when service is down -

I have a signal r application that is self hosted Windows service Hub . My JavaScript client is in index.html: & lt; Script src = "http: // localhost: 8080 / signalr / hubs" & gt; & Lt; / Script & gt; But the Windows service is not always running, so if this is not running and I try to load index.html then I get the error: Unwanted error: Signal R: Error loading hub. Make sure your center reference is correct, e.g. & Lt; Script src = '/ signalr / js' & gt; & Lt; / Script & gt; It makes sense because it does not search for the Javascript file until the Windows service is running. So my question is, how can I make it flexible, $ .getScript ("http: // localhost: 8080 / signalr / hubs") .done (script), textstats) {});

azure - how to keep httprequest in sequence using multiple instances of web role -

We have a public FTP API and have just started to move it to esor. Architecture now using command pattern : The web API captures the HTTP request in a message queue, and then handles another app message. The most important thing is that http requests should be handled in the order of submissions. My questions are how to take advantage of scalability in Azure if I use a Web Roll hosted on Web API and turn on many instances of web role for high performance, how can I ensure that Many examples will put the request in queue storage (or service bus or table storage) order of their presentation? If you do not currently have a custom sync mechanism, then this should not be any difference The API is running in an example or many. The only thing you need to do is to use the line of service bus which ensures brokerage messages. In this case the first message handlers coming in the queue will be the first, and so on. If you are thinking of using some sync mechanism for http requests in...

uiviewcontroller - Getting a great Video message Thread in IOS -

Image
I'm trying to achieve something like the following Basically I'll need a single UIView that is holding these objects, Record the user who posts a video and a reply function for a user and play back. Hard working for me is trying to do the same thing as a message feed. How can I contact to design this UIView so that I can get all the controls from MPMoviePlayerControl in a view of both the video for recording and viewing? As suggested by Paulo, the top half can be a webview where the video can be displayed . Apart from this, AVPlayer (or AVPlayerLayer) should use AVFoundation for image captures in the lower half. In this way you can get custom capture interface.

perl - Importing loosely structured data into database -

I get daily data feeds with data which is only loose, I have to import it into a database so that I Run a report that finds changes in new records and existing records. The data looks like this: --- ------------------------ ----- Blast Foo Bar Loram: Epsom Dollar: Seat Fu: Bar Bar: Afu 123-555-1212 Loram / Ipsum / Dialer / Sit Foo / Bar --------------- ----------------- As you can see, there are some field titles like "Blah", "Laram" etc. But some data does not have a title, such as a phone number or a slash delimited list. And some titles are on the same line and others are not. Just to keep us on our toes, there are no fields similar to records. So I think there is a need to have at least 3 ways to parse the data to parse, if "title: $" then the next "*." Hold the next lines and read "Title: Value" and if the line number starts with the title of "phone", and if the row has a slash delimited list then "...

angularjs - Why does the ng-repeat directive create a child scope? -

Question: Why ng-repeat instructions make a hair scope? I do not understand why this is the matter. Creating a new radius makes sense to an extent if you make a hair control clearly, but why would it automatically make one for every ng-repetition? I think this confuses me because if you loop in JS, this does not mean that the code outside the loop can not enter any variable inside. Example: For (var x = 0; x and lt; 10; x ++) {var y = x} alert (y); DOM Javascript is not in the items in your archive ng-repeat It is necessary to have separate scope on the ING, which is tied to repeat DOM elements and they make a tree of scraps that some mirror structure (somewhat) of the page Previously, this markup: & lt; Body ng-app = "myapp" & gt; & Lt; Div ng-repeat = "item in item" & gt; & Lt; P & gt; {{Item.name}} & lt; / P & gt; & Lt; / Div & gt; & Lt; / Body & gt; On the left side, the radius will spre...

timeout - Haskell -- Forcing strict evaulation with a weird, recursive type -

I asked a question about how to enforce timeliness to enforce strict evaluation. seq / $! Using is maximum time, and deepseq works for anything that is a member of NFData , but what if we use a weird recursive type are doing? Let's say we have the following: import control. Deepseek Import Control Silence Random Import Data Probably importing system Timeout new type A = A {runA :: A -> Int - & gt; Rand StdGen Bool} - A call to run with it is always example1 :: A example 1 = A (\ ii -> (if i> again see) randomR (True, False) as input and Incorrectly return)) - A call to run with it, as the first input example 2: A will not end with example 2 = A (\ _ _ -> run A example 2 example 2 0) Depends on - Example 1 will end with example 2 or 3 not with example 3: an example 3 = A (\ a _ -> run AA 0) Have Can write a timeout function that determines that some value x type A will end within a given time when we runA xx 0 Will you call on? We can try to...

Dojo getting element attribute ID from node -

All the following code searches are an internal text of "pre: bob" for a span and one element goes back (Which will be Input element) & lt; Input Dojoattachpoint = "text box, focusNode, _aroundNode" dojoattachevent = "onBlur :. onBlur, onFocus: onFocus, onkeyup: onkeyup" id = "2c6af1dc-80cb-44f2-864d-1fb00216895dF_SingleLine- widget" Name = "" class = "DijitReset dijitTextBox notDojoDndHandle "type =" text "tabindex =" 0 "aria- label =" text "width =" auto "value =" "aria-describedby =" 2c6af1dc-80cb-44f2-864d-1fb00216895dF_SingleLine- widget-placeholder "style = "Max-width: 2.5em; width: 90%;" & Gt; & Lt; span class = "dijitPlaceHolder dijitInputField" id = "2c6af1dc-80cb-44f2-864d-1fb00216895dF_SingleLine- widget-placeholder" style = "max-width: 2.5em; width: 90%;" & Gt; Formerly: Bob & lt; / Span ...

How to Html Encode but preserve some elements like tag in ASP.NET? -

I am writing an application in which we are using a service that gives results. The result is some HTML elements that are being printed as it is. Sample results: {values} "Mainly Impace Longspeed LeRenSpace .....} Now it has to be displayed in an asp.net page. If I encode the HTML, the span gets encoded I get the desired objects bold @ Html.Raw (message) - This works but all weaknesses are open and it is dangerous. This scenario The best way to handle Or is there any way in which I can print these HTML characters, yet what is the security? scripts , iframe , form tags, etc. As

java - JVM performance with these garbage collection settings -

I have an enterprise-level Java application that makes a few thousand users per day on this weblogic 10.3.6 (Java 1.6 JVM) There is a JACAB web service, using hibernate to hit an Oracle database. It also calls other web services. We see the following GC settings on our production system: -server -Xms2048m -Xmx2048m -XX: PermSize = 512m - XX: MaxPrimisize = 512m What is the effect of this GC sizing? The hardware has more than enough capacity to handle it. I know that it sets stack size and paragraph general at a steady level, but what is the effect of it when you finally have to store garbage? It seems to me that this happens less often, but it takes more time to happen. Is it true? It happens less often, but it takes longer when it can be done It may happen, it depends on the case of your use. You can also see that GC is less in the rare case. A 2 GB pile is not so much and I will use up to 26 GB without worrying about the size of the pile. This size is slight...

python 3.x - Simple adding spaces between variables in python3 -

I searched but found many things to remove space, I'm spanking new pythons and writing a simple program I am trying to get the name first, ask the last name and then greeting it. No matter how many spaces I keep between names, on the print function line, it keeps on putting together the first and last names together. name = input ("what is your first name?:)" Final = input ("what is your last name?") Print ('nice to meet you', name + last ) It outputs: what's your first name ?: jc what's your last name?: Jackson Good to meet you, Jesse Jackson desired product There are several ways to get: focusing the strings if you want to If you want to focus on the wiki string, you can use the + operator. It will focus on the way your strings are provided in your code. Example: & gt; & Gt; & Gt; StringA = 'this one' & gt; & Gt; & Gt; String B = 'test' & gt; & Gt; & Gt; Pri...

Java says I must return an Object, but I'm throwing exceptions -

So I'm trying to catch exceptions where I can not return a directory, but Java will not let me How do I configure the code so that Java can let me run it? Public directory path (string path) exception {throws {string [] arrayPath = path.split ("/"); Directory cwd_copy = FileSystem.getRoot (); Try {// Full Path if (path.startsWith ("/")} {for (int x = 1; x & lt; circope.long; x ++) {if (stuff) {} else {new exception ; }}} Return cwd_copy; } Hold (exception e) {pathErrorMsg (); }} No, you could be throw an exception , But then you grab it and do nothing with it! If you take the logical step with that code, you will see that there is no way to return to any directory and there is no exception to throw, because there are possible routes for the method of termination. It will not fly. Instead, throws public directory path (string path) pathdoid expression {string [] arrayPath = path.split ("/"); Directory cwd_copy = FileSystem.getRoo...

javascript - Use http-on-modify-request to redirect URL - Firefox Add-on -

I am creating an addon for Firefox which redirects the request to a new URL if the URL I have tried to do this, and it does not work. If the URL matches my status, then I register a supervisor on http-on-modify-request to act on the URL, I have a new URL Here's my code: var CC = Component category; Var ci = Components.interfaces; Var Cr = Component result; Var newUrl = "https://google.com"; Function isInlacklist (url) {// here will be somemore condition, I am just testing to use youtube.com if (url.indexOf ('youtube.com')! = -1) {true; } return false; } Export.main = function (options, callbacks) {// Create inspector httpRequestObserver = {Observe: function (subject, subject, data) {if (subject == "http-on-modify-request") {var httpChannel = topic .QueryInterface (Ci.nsIHttpChannel); Var uri = httpChannel.URI; Var domainLoc = uri.host; If (isInlacklist (domainLoc) === true) {httpChannel.cancel (Cr.NS_BINDING_ABORTED); Var gBrowser = utils.getM...

c# - Data Binding Issue -

I have a big problem with TextBox to force ViewModel to bind my data in TextBlock. I have established my following XAML code as follows: & lt; Page x: class = "digiBottle.MainPage" DataContext = "{binding source = UserProfile}" xmlns = "http: // schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http: // Schemas.microsoft.com/winfx/2006/xaml "xmlns: local =" using: digiBottle "xmlns: d =" http: //schemas.microsoft.com/expression/blend/2008 "xmlns: mc =" http : //schemas.openxmlformats.org/markup-compatibility/2006 "MC: Ignorable =" d "& gt; & Lt; Grid Background = "{ThemeResource ApplicationPageBackgroundThemeBrush}" Datacentext = "{Binding Source = User Profile}" & gt; & Lt; TextBlock HorizontalAlignment = "Left" margin = "219,72,0,0" TextWrapping = "Wrap" VerticalAlignment = "Top" height = "32" wi...

android - Does Buck have anything like Gradle's build variants and product flavors? -

I am using Buck for a big project, but I want to know what is equivalent to the versions of grading build. I More product flavors that are very useful. For debug vs release build (i.e., Code> BuildConfig.java ), there android_build_config () : is. If you are curious, then in detail how android_build_config () works and why it is a more efficient implementation than Grad, in particular, at the bank, you make debug at the same time Can build and build a parallel, but in Gradle, you can not. Although there is currently no document, the argument is to limit resource_filter and CPU_Filter to the appropriate APK to the appropriate resources. There can be a list like source_filter ['mdpi', 'hdpi'] , while cpu_filters can be a set [' Arm ',' Armv7 ',' x86 '] . At present, for each permutation, you have to type a different android_binary () rule, which is more tedious than defining things in Gradle. I recommend that you define...

sql - Approach to index on Multiple Join columns on same Table? -

Many tables have been included in each other and for me to be in a condition for a vertical table There are many columns for. For example select an a.av, b.qc TableA Add an INNER TableB b ON (a.id = b.id and a.status = '20' and a.flag = 'wrong' and a.num (1,2,4)) how approach should be. Include TableA (id, status, flag, number) on non-cloned index N_IX_Test (av); 2. Include the informal index N_IX_Test1 in Table (qc); I could have thought that these are two approaches, all the time when I see a number of columns when I am in position for the same table, I make it as a whole index and Is it OK to add columns to include in the selection list? Different algorithms require different sequences. Your indexing approach is only good for joining the nested loop, but I think it is a better option to be involved in a hash in that case. However, there is a move that makes an index useful for joining the hash along with nested loop: predicts non-job in the ind...

javascript - window print method is not working in ipad chrome browser -

मेरे पास निम्न कोड है: & lt; इनपुट प्रकार = "बटन" मान = "प्रिंट" ऑनक्लिक = "विंडो.प्रिंट (); वापसी वापस;" & gt; जो सभी ब्राउज़रों में काम करता है लेकिन यह आईपैड क्रोम ब्राउज़र में कुछ भी नहीं (प्रिंट डायलॉग बॉक्स खोलना) कर रहा है। मैं इस समस्या को कैसे सुलझाऊं? हालांकि अगर मैं क्रोम सेटिंग्स के साथ मैन्युअल रूप से प्रिंट करता हूं तो उसके काम को प्रिंट किया जाता है। पर एकाधिक प्रश्न तो शो (,,) कि वर्तमान में वैकल्पिक ब्राउज़र इंजनों के उपयोग पर एप्पल की नीति के कारण आईओएस के लिए क्रोम में प्रिंट करना संभव नहीं है। एक और समाधान एक तीसरी पार्टी के मुद्रण सेवा का उपयोग करना है:

mongodb - PHP: forcing use of extended class in different namespace by core class / function -

Background (though my problem can be generalized): I would like to integrate with the original roles (role-based authentication) to add to the specific database and an additional layer of security to limit access to the archive. As if the code tries to use the "dbname.foo.bar.baz" collection, then it will check the existence of the PPRBCAC permission "/ Mongo / DBNM / AF / Bar / Falcon" and ensure that the existing user's permission is. I would like to emphasize the original work to return to my extended version of MongoDB instead of the original MongoDB , as it usually happens. e.g. (1) MongoDB define the extended version of the name space MyUniqueNamespace; Square MongoDB \ MongoDB {public work __construct () {die ("we are definitely using extended version!"); } Public Function someStandardFunction () {authoriseOrThrowException (); Return parent: some standardfunction (); }} Force (2) Mongo client to use instead of \ MyUniqueName...

Using non NS_ENUM objective-C enum in swift -

I am using Wahoo Fitness API and it defines the objective-C enum: Typingfem Enum {/ ** is not an active connection * / WF_SENSOR_CONNECTION_STATUS_IDLE, / ** The connection is in the process of being established. * / WF_SENSOR_CONNECTION_STATUS_CONNECTING, / ** Sensor connection is established and active. * / WF_SENSOR_CONNECTION_STATUS_CONNECTED, / ** The connection was interrupted (usually when the fish is disconnected). * / WF_SENSOR_CONNECTION_STATUS_INTERRUPTED, / ** The connection is in the process of disconnecting. * / WF_SENSOR_CONNECTION_STATUS_DISCONNECTING, WFSensorConnectionStatus_t; I can not find a way to use it faster I successfully tried to make a switch / case without it. I am doing a point to take on the bus. want to try the following: var connState: WFSensorConnectionStatus_t = WF_SENSOR_CONNECTION_STATUS_IDLE ... if (connState == WF_SENSOR_CONNECTION_STATUS_IDLE) { but this compilation does not: Priwart any workaround National is? WFSensorConn...

html - jQuery add a to text after 50 characters -

I use the tag "html" on the tag " > After adding HTML to more than 50 characters My HTML: & lt; Table & gt; & Lt; TR & gt; & Lt; Td class = "ccol1" & gt; If it is 50 characters in its characters then it should go to the next line & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; I tried to use Google's results but it does not seem to work. $ ('.ccol1') .each (function () {var str = $ ('td' + '.ccol1'); var htmlfoo = str.match (/. {1 , 50} / g) .join ("& lt; br / & gt;"); $ (this) .html (str);}); Besides, I only want to do this using jQuery, please do not use CSS word-wrap. Thanks Here is a JSFiddle link based on your existing code. As the code snippet $ ('ccol1'). Each (function () {var str = $ (this) .html (); var htmlfoo = str.match (/. {1,50} / g) .joint ("& lt; br / & gt;"); $ (This) .html (htmlfoo);})...

hashtable - Efficiently get hash entry only if it exists in Perl -

I am often writing pieces of code like this: if ($ myHash Exists - & gt; {$ key}) {$ value = $ myHash-> {$ Key}; } What I am trying to do is get value from hash if that has the key in hash, and at the same time I want to avoid having to turn on hash entry automatically Already exists. Although it kills me that it is quite incompetent: I am searching a hash to know that a key is present, and then if it exists then I have another hash key to remove it. This becomes even more inefficient in a multilevel structure: if ($ myHash-> $$ exists-> $ {key1} & amp; & Amp; amp; amp; amp; amp; MyHash- & gt; {$ key1} {$ key2} & amp; amp; is available $ myHash- & gt; {$ key1} {$ key2} {$ key3 }) {$ Value = $ myHash-> {$ Key1} {$ Key2} {$ key3}; } Here I'm doing 9 hash lookup instead of 3! Is Pearl enough to adapt such a case? Or is there any other phrase to get the value of an hash to automatically verify the entry or to see it twice? I h...

php - Page not found on request url in zend 2 framework application -

Image
I'm new to zooming the framework and I'm trying to configure the zend. I successfully installed the zendskeleton applicaion at Window 7 and XAMPP I was making the new module album as defined. In the User Guide I was creating all the code and pages according to the guide, but after that I was able to open the Album Module I did not find the error 404. here application.config back array ('module' = & Array ('application', 'album',), 'module_paths' = & gt; array (' ./module ',' ./vendor ',),' config_glob_paths' = & gt; array ('config / autoload / {, *.} {Global, local} .php ',),)));); module.config return array ('controller' => array ( 'Array (' path '= & gt; array (' album '= & gt; array (' album \ controller \ album '=' album controller \ album controller ')),' router '= & Array ('type' = & g...

c# - Uploading multiple images to server. If only one image is bigger than size limit or wrong file extension then all other fails -

Image
I have the following code that uploads multiple pictures to the server; it works well until all the selected Images are less than the size limit and the correct file extension. However, if an image does not meet those criteria only then all other images are not published. Why? I only want an image that does not meet the criteria to fail. Protected Zero Upload File Tags (Object Sender, EventArgs e) {if (UploadImages.HasFiles) {string strConnString = System.Configuration.ConfigurationManager.ConnectionStrings ["DefaultConnection"]. ConnectionString; SqlConnection con = new SqlConnection (strConnString); Con.Open (); {Foreach (Try HttpPostedFile Upload file in. Upload Images.Posted Files) {string FileExtension = System.IO.Path.GetExtension (UploadImages.FileName); If (file extension == ".jpg") File extension == ".jpg" || FileExchange == ".GIF" || File extension == ".tiff") {UploadStatusLabel.Text = ""; Int fileSize = Uploa...

unity3d - BoxCollider2D Bounds in Unity -

I have a BoxCollider2D variable, which is called bound , I have the bounds Trying to use , but it does not recognize the border and in this way I can not get the extreme of box-level 2d bounds. I'm using Integration 4.3 is not available in version version? They say that bounds for Collider2D will be available in future updates. They say that bounds for Collider2D will be available in future updates. For now, you have to calculate the range in the script. You can get a good solution.

How to read / accept / reject meeting invite in Mozilla Thunderbird -

Image
When someone sends me a meeting invite from Microsoft Outlook, then I have a properly formatted e-mail in my Mozilla Thunderbird not get . Can someone tell me about the invitation to accept / accept the invitation to a third party? You can use it for thirdbird. After installing and restarting, you can now accept Outlook invitations

How to upload image to web page in Saucelabs test by Selenium in c#? -

I have to upload any image on the web page to create an online shop to go on trial. I have to click on the button to upload, after which I have to give the directory of the file, but I can not give the local directory because the test runs on the SOSBab on the VOM. How to solve the problem? LocalfilDDatak class. Your code will look something like this: // Warning !! Without the benefit of an IDE, uncharted code written from memory can probably not work properly or can compile without modification. // Assume that the driver is a properly instant iWebDriver object, which is used with a remote service (with SauceLabs or similar). IAllowsFileDetection file as a Dynamic Directory = Driver IAllowsFileDetection; FileDetectionDriver.FileDetector = new localfiledetter (); IWebElement File Element = driver.FindElement (By.Id ("idOfFileInputElement")); FileElement.SendKeys (@ "C: \ path \ \ local.file"); By setting the file detector, the SendKeys method will...

c# - Combine content for multiple markers in one infobox in google maps through Asp.net -

I am working with google map in asp.net in SQL Server 2008. I have several records for the same latitude and longitude, instead of showing several pins, I would like to display a pins on top of the pin and in Infobox to display the content from those pins. Here is my javascript code: window.onload = function () {var infoWindow = new google.maps.InfoWindow (); Var map = new google.maps.Map (document.getElementById ("dvMap"), map options); {Var data = marker [i] var myLatlng = new google.maps.LatLng (data.lat, data.lng) for (I = 0; i & lt; marker; langti; i ++); Var marker = new google.maps.marker ({status: myLatlng, map: map, icon: 'marker page', title: datatylet, animation: google.maps.Animation.DROP}); (Function (marker, data) {google.maps.event.addListener (marker, "click", function (e) {infoWindow.setContent ('& lt; div style = "width: 250px; height: 80px; background: red "& Quot; + data.description + '& lt; / di...

php - Searching in an array indexed in ElasticSearch -

I have indexed a document in ElasticSearch which contains arrays like this: doc [" match "] [" eventType "] ==" requires a query "league" ) I am using ElasticSearch-PHP api 1.1.0 and thus tried to query without success : ['Event'] ['eventType'] = 'league'; $ params ['body'] ['query'] ['match']; I also tried: $ params ['body'] ['query'] ['match'] ['match'] -> EventType = 'league' ; What is the right way to do such searches? There are no such examples in the documentation. Can you convert this JSON to a php object? {"query": {"match": {"match.eventType": "League "}}} I think this work.

sqlite - How to check database is exist or not in phonegap? -

I am using PhoneGrap and Onsen-U to build mobile applications. I want to check that the SQL database exists or not if the database does not exist then navigate to the main page to set up the page Resolve this problem How to do? Thank you and sorry for my bad english. Create plugins for Android and iOS and check through the plugin if the SQLite target file exists . In the case of Android, this post will help you. This post will help you in iOS.

node.js - nodejs - how to get cookie in ws (einaros) -

सॉकेटियो में, मैं आसानी से socket.handshake.headers.cookie के साथ कुकी प्राप्त कर सकता हूं। ws ? आप यह कोशिश कर सकते हैं एक: ws.upgradeReq.headers.cookie ।

gruntjs - Website by ip address loads quickly, by domain on cloudflare, forever -

"itemprop =" text "> After you load the site my site (146.148.39.138) is blazingly fast, but when you go to the domain name To go (zanehitchcox.com), which is hosted on CloudFlare, take resources to load forever. As you can see, the site is just installed with a barebones angular bootstrap app yo and is run by grunting. What is weird background load immediately, I am guessing because it has been cached, but the text seems like 10 seconds to load. After the text "itemprop =" text. "> For what it's worth: shows the site does not pass through CloudFlare together, Taking roughly 4.3 seconds to load, "Render in Start 4.33 seconds" to load The test is looking to be all about the same (4.2 - 4.3 seconds or so) : If you would be interested in re-enabling CloudFlare on your site we would be happy to see further things. With CloudFlare enabled, open a support ticket with details of what you are looking for. Our support team can help...

WSO2 identity server implementation for single sing on for multiple web services deployed on different tomcat server -

I am trying to implement the wso2 single sign login I have more than 5 web services, two different tomat servers Posted on I have also tried the tutorial below for you And what I can do is successfully redirect when my web service hits But this redirects me to the WSO2 login page (as I am the configured wso2 SAML service provider). And after the correct username password it is showing that you are logged in as an administrator. Instead of redirecting to the identity server for a way to enter, I can only pass the username and password in my request (from the web service) and the wso2 identifier manager checks it. And let me give feedback back to feedback whether I should be able to identify the user and if he tries to use any other web service he can do so. Should the (sso impl). I do not need to implement the whole code work with STS How to configure WSO2 detection server, this is the official document, you will be able to apply your scenario with it.

matlab - Convert cell array of strings to double array -

This question and an answer is already here is: 2 Responses I have a Matlab the cell that looks like this: '1406200719565' '1406200719583' '1406200719598' '1406200730211' '1406200730226' '1406200730242' '1406200731023' '1406200731889' '1406200732801' '1406200733670' I do not want this to convert each string into one double and then to a double arrayI followed various methods that could be found in the net, but none of them worked. Like I used the suggested approach, but the result is only a vector with NaN. What else can you do? Have you tried this: S = { ' 1406200719565 '' 1406200719598 '' 1406200730211 '' 1406200730226 '' 1406200730242 '' 1406200731023 '' 1406200731889 '' 1406200732801 '' 1406200733670 '} Selfn (@ Strobnm, S)

c# - How to automate task of consuming webservice -

मेरे पास एक winform application है जिसे वेब सेवा का उपभोग करने की जरूरत है । किसी भी परिवर्तन के लिए डेटाबेस में वेब सेवा चेक यदि डेटाबेस में कोई परिवर्तन है तो Winform आवेदन को अधिसूचित किया जाना चाहिए और इसके अनुसार कुछ कार्य निष्पादित किए जाएंगे। मैं यह कैसे करूँ? मैंने अपने विनफ़ॉर्म आवेदन में टाइमर का उपयोग करने के बारे में सोचा और हर 5 मिनट एक वेब सेवा से जुड़ने के बाद और जांचें कि क्या डाटाबेस में नए बदलाव किए गए हैं या नहीं। इसके लिए कोई अन्य तरीका क्या है? अपडेट: मैं यहां कोड पोस्ट के आधार पर पोस्ट कर रहा हूं: class PerformTasks { सार्वजनिक स्थिर बूल चेक इंप्रेशन {प्राप्त करें; सेट; } सार्वजनिक स्थिर शून्य InitializeWebService () {कोशिश {टाइमर = नई सिस्टम। टिमर्स। टिमर (2000); टाइमर। Elapsed + = OnTimedEvent; टाइमर। सक्षम = सत्य; }} निजी स्थिर शून्य कॉल सेवा () ((var सेवा = नया WebServiceSoapClient ()) का उपयोग कर {checkIfInProgress = true; कार्य 1(); task2 (); popMessage (); CheckIfInprogress = false; }} निजी स्थैतिक शून्य OnTimedEvent (ऑब्जेक्ट स्रोत, El...

javascript - combining overlays in mapbox / leaflet layers control -

I am trying to combine 2 or more overlays in an overlay checkbox. I am using the bookmark with mapbox.js 1.6 to toggle my overlays. If I add them to a data layer on mapbox.com, or if I combine different data layers in an overlay checkbox in my JS code, then I do not make any difference, but I can not do it I am exporting MBTiles to my Mapbox account. Note that this is not an option: Tilemil them (a zoom level and square bounding box A map project on Mapbox.com Add different data layers in (I want it to be toggleblog by user) You can use the L. layer group to combine var group = L. Add layer layers for group group ([layer 1, layer 2]; // maple. Layer 1); // Switcher control var controlLayers = L.control.layers (Baselier) .addTo (map); You may be interested in this thread

matlab - How to find values of the input data in plotsommaphits -

I used the SOM toolbox in MATLAB or Iris data set. By using the following examples and plotsimhits, I can see how much data values ​​are in each neuron in my neuron grid of the SO. However, I want to know the real data value that is divided into each neuron given in the given SOM configuration. There is no way to do this, this is the example I used. net = selforgmap ([8 8]); See (net) [net, tr] = train (net, x); Nntraintool plotsomhits (nets, x) It is not difficult plotsomhits results of the simulation of the net "fluffy" bus plots. So if you simulate it and add "hit" then you have the result! Basic: hit = sum (sim (nets, x) '); This was my result in my net case, which matches the numbers in plotsomehits hit = 6 5 0 You can learn a lot in this amazing SO answer: P>

Undefined variable not shown as error with Java Eclipse -

By entering and compiling Java class, there was no error in the code public class exam {public static zero main (string agre []) {xCase = yCase + 100; }} The identifiers xCase and yCase can not be defined, this can not be correct, so I got 2 errors by running the command line compiler to check it C: \ Test> Javac Test. Java Test. Java Error: Icons can not find xCase = yCase + 100; ^ Symbol: Variable xCase Location: Class Test Test. Java Sign: Error: The icon xCase = yCase + 100 can not be found; ^ Symbol: Variable yCase Location: Class Test 2 Errors Why is Eclipse not showing me this error? Resolve red markers in "Marker" first.

Win 7 in virtualbox that already runs in virtualbox? -

Can you install Win7 in Virtualbox, which already runs in a Knighter Win 7 virtualbox? The question also applies to any other operating system. Each virtual machine is technically " Independent ", and with Virtualbox, you can do this easily, as it is supported on both Windows and Linux host operating systems (emulate or not). You can simply use Windows as your "base host" OS, you can run Linux in a VM, and then use that operating system as a new base-host for Boch. Check it out

c++ - Elegant way to pass multiple arguments to a function -

मुझे एक फ़ंक्शन मिल गया है जो इस तरह दिखता है: bool generation_script (bool net , Bool tv, bool फोन, std :: string clientsID, std :: string पासवर्ड, int अनुक्रमणिका, std :: string संख्या, std :: string Iport, std :: string sernoID, std :: string VoiP_number, std :: string VoiP_pass, std :: स्ट्रिंग लक्ष्य, इंट स्लॉट, इंट पोर्ट, इंटू, इंट अतिरिक्त, एसटीडी :: स्ट्रिंग आईपी, एसटीडी :: स्ट्रिंग मैक); मेरी राय में यह बदसूरत लग रहा है इस समस्या से निपटने का सही तरीका क्या है? क्या मुझे अलग-अलग डेटा प्रकारों (इंट, स्ट्रिंग और बूल) के साथ कुछ वैक्टर बनाते हैं और उन्हें इस फ़ंक्शन पर तर्क के रूप में पास करते हैं? यदि इन सभी मापदंडों को सार्थक रूप से संबंधित है, तो उन्हें एक संरचना में पैक करें।

Can multiple rails application use one redis for resque jobs? -

There are way too many tracks to use for a redis (for background jobs) applications. Edit: If I use the same reads for all applications, then in a different design there are several lines of rows from different applications, raising the issue that an app's rushes May be the process of wrong work. "itemprop =" text "> You can use the name space to connect to Redis such as Resize Setting in the document As: Resque.configure do | Config | #Redis connection set: 'Hostname: port [: db] [/ name space]' - # string # redis - a redis connection will be namespaced - # string a redis url string: any takes (for example, Port redis: // host '): resque # redis :: namespace - as a namespaced redis connection will be used # redis :: distributed - a redis connection hash (eg {- used a distributed redis connection Will be # hash as: Host = & gt; 'Local Host' ,: Port = & Gt; 6379 ,: db = & gt; 0}) config.redis = 'localhost: 6379: ...

eclipse adt - android imports cant be resolved in a test project -

Hi IM tried to import a demo test project from Google, but the following import resolver can not be Ex> import com.example.android.testingfun.R; // This is the class for which import com Exploration Android Testing Fun.Alson 2. Merryfest Test Activity; Import com.example.android.testingfun.lesson3.ClickFunActivity; Import com.example.android.testingfun.lesson4. Launch activity; Import com.example.android.testingfun.lesson4.NextActivity; Import com.example.android.testingfun.lesson5.ReceiverActivity; Import com.example.android.testingfun.lesson5.SenderActivity; Thank you for importing the project in the Implips ctrl + 1 Fix fixes project, add to bath

google apps script - How can I send url of my Spreadsheet in email -

How can I send the URL of my spreadsheet by email? My code: var emailAddress = "My email"; Var url = ""; Var topic = name1; MailApp.sendEmail (email address, subject, url); This code that sends email. But how can I get my own URL (spreadsheet)? Assume that your spreadsheet is created go to file-> share , A dialog should pop up with your sharing settings At the top there should be a URL that you can send to people. Some additional notes: If your spread sheet is set to Private, you can change the settings, such as those with the link , They can see the spreadsheet. Edit: Application Script API var ss = SpreadsheetApp.getActiveSpreadsheet (); Logger.log (ss.getUrl ()); Then in your case: mailapp. SendEmail (email address, subject, ssUUrl ());

fullcalendar - Events and Full Calendar in CakePHP -

Image
I set the full calendar plugin in CakePHP, I can see it, it is displayed, In my complete calendar plugin my PHP Controller (Visual admin feed) I do not know what is wrong, no events have been displayed in my calendar. I am grateful if anyone knows why my calender is empty, look at the screen, it's in my console: The answer is null. js file: // javascript document $ (document) .ready (function () {$ ('agenda wake', previously: 8, week mode: (# Header: {left: 'Previous, Next Today', Center: 'Title', Right: 'Month, Agenda Wiic, Agenda Day'}, 'Variables', aspect Retro: 2, Editable: True, Event: {url: FcRoot Text color: 'black', // an option!}, Layout: function (event, element) {}}}}; ; Get the list of events (JSON) public function admin_feed ($ id = null) The feed action is called from js {/ code> EventController $ This-> Layout = "AJAX"; $ wars = $ this- & Parameters ['url']; $ Conditions = ...

javascript - $_POST empty after ajax post called -

Image
Then using this AJAX post, I have to use some JS variables in the WordPress loop, so I have a custom loop, ajax post Depends on the basis of variables in Below is the AJAX call. $ ('collection-more'). Click (function () {$ .ajax ({type: 'post', url: 'http://tmet.dev/wp-content/themes/muban-trust/single-collection.php', data: {" Test ":" hello "}, success: function (data) {console.log (data);}})}} Currently I am sending hard-coded data. / P> In my single-collection .php page: & lt ;? php print_r ($ _ POST); if (isset ($ POST ['filter [artist]'] ]) $ $ Filter_obj = $ _POST ['filter [artist]']; $ filter_array = json_decode ($ filters_obj, TRUE); $ i = 0; $ i & lt; size ($ filter_array); $ i + +) {Resonant '& lt; p & gt; h'. $ Obj- & gt; name. '& Lt; / p & Gt; ';}}? & Gt; I'm just using print_r to debug the problem, currently returns this return: Array () ...

c# - Simplest way to calculate anniversary given a date in the past? -

I need a function which calculates that if a person has a date of the beginning of the current and present date For an upcoming anniversary. I got this code below, but by looking at the code given below and I'm feeling this is a very easy way to calculate it without loop: personal const int ANNIVERSARY_ALERT = 10; Public virtual string upcoming milestones {{var years = years (+ 2); (Int year = 0; year> year; year ++) {int day = year * 365; Int diefiff = day - numberofday; If (Didiff == 0) {return year + "year landmark"; } If (Dediff & lt; ANNIVERSARY_ALERT & amp; Daydiff & gt; 0) {Return Year + "Day Def +" "Landmark" Day; }} Return string Empty; }} Public Virtual Entomophage {get {timeSpan ts = DateTime.Today - StartDate.Value; Return (int) ts shielded; }} Public Virtual Favourited (Year) (Time Span Span = DateTime.Now Subtract .Valil; Return (int) (span.Days / 365.25); // leap years included} Can anyone recommend this loop wit...

java - Handling Alert/Confirm with JavascriptExecutor in Selenium GhostDriver -

I am frustrated I am using Java in Prem Kija with Java 1.1.0 selenium 2.42.2. For my test, it is necessary that I identify and store alerts and confirmation messages and maybe when I open the page, the Pretium driver does not apply it yet, so I need to work with Javascript Extractor but I I am a js knob and can not manage it alone. Here's my code and what I tried: desired capabilities dcaps = new desirable capabilities (); String [] phataeorgs = new string [] {"--webdriver-loglevel = NONE"}; Dcaps.setCapability (CapabilityType.ACCEPT_SSL_CERTS, true); Dcaps.setCapability (CapabilityType.SUPPORTS_ALERTS, true); Dcaps.setCapability (PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, phantomjs.getAbsolutePath ()); Dcaps.setCapability (PhantomJSDriverService.PHANTOMJS_CLI_ARGS, FontArgS); Dcaps.setJavascriptEnabled (true); WebDriver driver = new fandommedsdrive (DCEP); Javascript explorer js = (javascript expander) driver; String script = "window.confirm =...

axapta - How to get Catch weight concept in Ax 2009 -

What is the capture of the weight concept in the xpeta 2002 because it is in the xpeta 2012? If not, then in AX 2009 only. Is there any work? Please help You have two options: Apply the feature to itself (probably limited functionality) Upgrade to AXA 2012 will take both time and effort

c# - Web API 2 not working (404) -

I have been trying long time Web API 2 is working. I have read a lot of articles and posts on the Internet, But till now I have been inauspicious. I just need to work as a simple web API method, but for some reason I have not yet received 404 method. I really do not know now where the problem can be, because I think everything is fine. I have tried many features, configurations and so many changes. I end up with this code: Global.asax Regional Registration. Registrar AllAreas (); FilterConfig.RegisterGlobalFilters (GlobalFilters.Filters); RouteConfig.RegisterRoutes (RouteTable.Routes); GlobalConfiguration.Configure (WebApiConfig.Register); WebApiConfig.cs config.MapHttpAttributeRoutes (); Config.routes.MapHttpRoute (Name: "DefaultApi", Margaemplate: "API / {Administrator} / {ID}", default: new {id = RouteParameter.Optional}); Var app xml type = config.formatters.xmlFormatter.SupportedMediaTypes.FirstOrDefault (x = & gt; x.MediaType == "app /...

c++ - Include mm file in m file -

I have a C ++ code and a class announcement. MM file is I want to include it in another .m file but the compiler starts giving an error in another class unknown type name 'class'; For example AM - & gt; In this class "B.H." Has been included B.h - & gt; Include "AH" when trying to import #h. Returns the error. BM - & gt; # Ah gives an error to "ah" while trying to import. I have tried to use the structure in .m file but this method is not called in the example. Any help would be appreciated. What are you actually trying to do? Trying to include source files from within source files is very rare, and usually there is a smell of something else in the architecture of your program. Usually, you must have a title and implementation file .m and .mm file each. If you do not want to place ObjC class announcements in the main header (for example, because you are implementing a framework and it is the public API of th...