Sunday, 15 February 2015

sql server - SQL Update Multiple Rows -


  अद्यतित सारणी SET COL_1 = (SELECT SUM (TOT) से TABLE_2) WHERE CUST_NO = TABLE_2.CUST_NO   

तो, यह मेरा एसक्यूएल अब तक है। मूलतः, मैं TABLE_1 में COL_1 को TABLE_2 में संग्रहीत TOT की राशि के रूप में COL_1 को अपडेट करने का प्रयास कर रहा हूं। मैं इसे दोनों तालिकाओं से CUST_NO पर अपडेट करने की कोशिश कर रहा हूं।

मुझे पता है कि मेरा कोड बिल्कुल काम नहीं करता, लेकिन मुझे यह नहीं पता कि यह कैसे करना है

तो मेरे एसक्यूएल चलाए जाने से पहले TABLE_1 से एक पंक्ति का एक उदाहरण होगा:

  | CUST_NO | COL_1 | | 1000 | नल | | 1001 | नल |   

और टेबल 2:

  | CUST_NO | TOT | | 1000 | 15 | | 1000 | 17 | | 1001 | 13 | | 1001 | 12 |   

और जो मैं अंततः चाहता / चाहती हूं:

TABLE_1:

  | CUST_NO | COL_1 | | 1000 | 32 | | 1001 | 25 |    

यह हो सकता है कि आप क्या चाहते हैं:

  अद्यतित टैबली SET COL_1 = (SELECT SUM (TOT) से TABLE_2 WHERE table_1.CUST_NO = TABLE_2.CUST_NO) से यह मान लिया गया है कि आप सभी पंक्तियों को बदलना चाहते हैं। अन्यथा, इसे आज़माएं:  <पूर्व>  अद्यतित सारणी SET COL_1 = (SELECT SUM (TOT) से TABLE_2 WHERE तालिका_1.CUST_NO = TABLE_2.CUST_NO) जहां मौजूद है (तालिका 1 के द्वारा 1 तालिका का चयन करें WHERE table_1.CUST_NO = TABLE_2 .USUSNONO)   

पंक्तियों को अभी बदलने के लिए जहां तालिका 1 में ग्राहक संख्या तालिका 2 में है।

डेटाबेस के आधार पर, शायद यह व्यक्त करने के अन्य तरीके हैं हालांकि, यह सिंटैक्स अधिकांश डेटाबेस में काम करना चाहिए।

java - Hibernate Criteria with Projections.groupProperty cannot return full hibernate object (ClassCastException) -


I'm relatively new to hibernate and there is a problem adding "separate" restrictions to my hibernate class.

  @Entity Public Category Tagged Offer {Private Long Tag_offers_id; Private string brand; Private long CID; Personal date created_data; // Getter and Setter and more fields}   

Earlier, we were creating a hibernate query as follows:

  Public Detected Works in Build (Last Tag Offer request made) {different taxonomic criteria = Separated Ceritaries. Forbes (Tagged off class); Criterion Add (restriction. Eq ("brand", request.getBrand ())); Criterion Add (restrictions. ("Cid", request.getCids ())); // Sorted by date criteria. AddOrder (property.forName ("createdDate"). Desc ()); Return criteria; }   

This will create the following (working) HQL query:

  Select this_tagged_offers_id as Tag 1_2_3_, this_.brand as brand2_3_, this_ Cid as Cid2_3_, created in this_.created_date form 6_2_3_ site.tagged_offers this_ where this_.brand =? And this_.country_code =? And in this_.cid (?,?) The order by the _.created_date desc border?   

Here comes the tricky part. Now we need to ensure that the results are given which are different on the 'CID' field. Meaning, return as many results as possible, a specific CID can be made available in each record.

I saw it in SQL, and it seems that the easiest way to do this is to simply hibernate in a 'group by CID' query, in terms of norms, what I basically do Trying to:

  Creating a Public Separation Classification (Last Tagged Offer Request) {Separate Criteria Criteria = Different Classification. Class (tagged operator. Square); Criterion Add (restriction. Eq ("brand", request.getBrand ())); Criterion Add (restrictions. ("Cid", request.getCids ())); // Sorted by date criteria. AddOrder (property.forName ("createdDate"). Desc ()); // ** new ** different criteria criteria .Setprogication (projection groupProperty ("cid")); Return criteria; } It creates almost the HQ that I am looking for, but later it throws a class cast exception (because it opposes Sid field contrary to the whole object). .  
  Select this YouTube as site0agged_offers as y0_, where it_.brand =? And this_.country_code =? And in this_.cid (?,?) And tagtype1_.tag_type =? This_med_date desc limit by this_.cid command by group?   

And the exception:

  java.lang.ClassCastException: java.lang.Long can not be put on com.mycompany.site.taggedoffers.dao .   

By any idea how can I use projections to work my way Am I

Get estimates for all the columns you need.

  launch list projection list = projection Projection list (); ProjectionList.add (Projections.groupProperty ("CID")); ProjectionList.add (Projections.property ("tagged_offers_id")); ... Criteria. Launch (projection list);    

ios - How to set mysql_protocol_tcp in Objective C Mysql client -


I downloaded the MySQL source and libraries of Carl Craft and created a MySQL Client Lib for iOS 6. The local mysql database even handled the Blob data well.

The next step was to port in a remote database. After downloading various libraries and tearing my hair, I went looking for a pack solution.

I got the SSH Tunnel Library (FREE 30-day trial - and $ 149 for Chuckack) Have downloaded He also worked for the first time. It was a pleasure after the day and the nervousness of not building, not adding, not compiling, no i386 blah blah blah !!

OK, so here's the kicker. Now I want to work with remote database When I forward 3306 SST ports via a SSIT port 22 to 3306 on a database machine behind the firewall, I now close mysqld, and my host is Local Host Port 3306. There is a slight problem with my SSL

The client's default launch on Unix / Mac machine is to look for socket connections on the localhost.

I get the following error:

Error: Can not connect to the local MySQL server with the socket '/tmp/mysql.sock' (38) < / P>

For mysql I need a TCP protocol option to start, with a command line, it is easy --protocol = TCP.

With an iOS customer, this is not easily obvious. I did a search and in mysql.h we have mysql_protocol_type and constants mysql_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP etc.

The missing knowledge I have, to set programmatically in Objective-C.

is a server object that defines the parameter (server, name, port, user, password) and the next object is a connection object that calls mysql_init (). Does anyone have any clue on this?

BTW: A man of Karl Kraft and Shil, must keep his blood preserved for future generations. They saved me a lot of time.

Thanks in advance.

I took some time to find out with mysql client, if you were 'localhost ', Then this is ////. However if you specify the localhost as 127.0.0.1, then it connects to a TCP protocol equal to --protocol = TCP.

amazon web services - AWS : Accessing Auto Scaling Instances -


I have set up automatic scaling CLI and have also created two groups.
This is some sample output: Description-auto-scaling-example - Title organization- Investment-ID Group- NAME Availability - Region State Status Launch - Description -

  -bash-4.1 # Confidential Insurance i-2aaf0e42 MyGroup_micro us-east-1a InService Healthy MyLC_micro INSTANCE i-88338 C4 MyGroup US-East-1 Insurability Health MyLC   

My problems are: 1. 1. I do not see the above examples in my EC2 dashboard. Is this okay?
2. Can I enter those examples? If yes, then how?

  1. They should appear on their dashboard Occasionally not immediately, but it will eventually show.
  2. Yes, for example get an IP address and log in with the authentication you have configured.

Log a full request URL in IIS -


I am using IIS 8 on my Windows 8 development machine. I am developing an ASP.NET MVC 4 WebAPI-based application, which has interfaces with third party servers.

One of these servers (Kaltura Content Management System) sends a notification that I can not "catch" with my routing and / or controllers to log in to the full request url on IIS I am trying.

I have established IIS Advanced Logging and have configured it to enter all the available fields (except for working counters), but the logs do not have the URL or the content of the request (a form).

My question is, is it possible to log full URLs in IIS?

There is no default way to log all form fields logging everything will be huge enough to go log files very quickly If everything was a way to log viewstate logging and all post fields (if you are uploading a 20MB file)

If you want to support something like this, you will be creating a custom handler or in the website code itself (for example in the master page so that you do not want to add the logging code to each page).

sql server - EF4 insert data via scripts -


I know that by default EF code first sets StoreGeneratedPattern = Identit it's OK. But I want to include some part of the data via the SQL script. I know that at the time only one table can be on the SET IDENTITY_INSERT rules;

But when I try to run

  USE [GameDatabase] GO GO ON ATNSINNLS SET QUOTED_IDENTIIFIER SET - Rules on Game SET IDENTITY_INSERT RulesOfGames; RulesOfGames (RulesOfGameId, MaxScore, IsPossibleEqualsScore) INSERT (1, 20, 1) in values; SET IDENTITY_INSERT RulesOfGames OFF; - Kindsport SET IDENTITY_INSERT RulesOfGames on; Include in prices (KindSportId, Name, RulesOfGame_RulesOfGameId) Value (1, 'ÑÑ ?? Ñ ?? Ð ± оР»', 1); SET IDENTITY_INSERT Consort of Off;   

I get an error and I want to set a specific ID to set up a special argument set.

  Message 8107, Level 16, State 1, Line 3 IDENTITY_INSERT Table 'GameDatabase.dbo.KindSports' is already running for table 'RulesOfGames' SET can not perform action for   

How can I solve my problem?

set IDENTITY_INSERT RulesOfGames; RulesOfGames (RulesOfGameId, MaxScore, IsPossibleEqualsScore) INSERT (1, 20, 1) in values; SET IDENTITY_INSERT RulesOfGames OFF; - Kindsport SET IDENTITY_INSERT type assistance; Include in prices (KindSportId, Name, RulesOfGame_RulesOfGameId) Value (1, 'ÑÑ ?? Ñ ?? Ð ± оР»', 1); SET IDENTITY_INSERT Consort of Off;

applescript - Why is my applescrpt returning 2 msgbox while running the excel macro? -


The following subscription macro is running twice because I receive the message bar twice.

  Run the application "Microsoft Excel" to run VB macro "Test .xlsx! Test ()"   

and test () Macro:

  Sub-testing () MsgBox "This is an Excel macro." Last sub   

I'm getting the message box "This is an Excel macro." It seems twice that it is running twice, why is it going on two occasions with any idea?

I noticed that when an apple is disturbed, it can sometimes run again from the beginning For, usually when it calls some third-party applications.

ios - UILabel with different fonts -


Want to appear in the string to me that I have a label like:

  NSString * criticsScore = [NSString stringWithFormat: @ "% @ \ %%", [Dic Objektforki: @ "Aloikkon_skor"]]; _criticRating.text = criticsScore;   

I \ %% and [dict objectForKey: @ "critics_score want a larger font set to"];
Is this possible?

You need to use your control to a NSAttributedString like

  NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString: [NSString stringWithFormat: @ "Blah1: fuck to% d Blah2: -.% d%%", [CurrentCoupon.couponPrice intValue ], [CurrentCoupon.couponDiscountPercent intValue]]; [Str addAttribute: NSBackgroundColorAttributeName Price: [UIColor clearColor] Range: NSMakeRange (0,30)]; /// range defined and the background color that you [str addAttribute here: NSForegroundColorAttributeName value: [UIColor blackColor] Range: NSMakeRange (0, 30)]; /// Range Define here and also the textcolor color you want [str addAttribute: NSFontAttributeName value: [UIFont fontWithName: @ "HelveticaNeue-Bold" Size: 20.0] Range: NSMakeRange (20, 10)]; LblWithText.attributedText = str; I got the code from the top   

multiple loads in neo4j -


I have loaded some data into the neo4j graph database using the batch importer. I now say that I need to load more data So, what should I track down what was externally inserted or there are standard features of neo4j which can be used for:

1) Get the ID for the last insert node So that I can find the ID for that new node Minister needs and accordingly index.

2) Get the list of nodes already present in the database so that I can see the specificity of the nodes. If a node already exists in the database, then I will use the same ID and will not create a new node.

3) Check the uniqueness of the three - say "January Month is_a" is already three times in the Neo4j database and we say that whatever new data you want to insert is also There is only one Tripathi, I would not like to include him because it will duplicate results. For example: If you add the following data to the neo4j graph database by using the batch-importer:

  $ name of name cat nodes.csv Work_on Michael 37 neo4j Celina 14 Rana 6 Selma 4 $ Cat nodes_index.csv 0 Name Age Task_on 1 Michael 37 neo4j 2 Celina 14 3 Rana 6 4 Selma 4 $ Cat Relays. Start of type starting with CSV counter: Int 1 2 FATHER_OF 1998-07-10 1 1 3 FATHAIF 2007-09-15 2 1 4 FATFFFIFIFIFIF 2008-05-03 3 3 4 SISTER_OF 2008-05-03 5 2 3 SISTER_OF Now, if you have to add more data to the same database, then you have to know the following:  

1) If the nodes are already What are their IDs, if you can use them while making the treble, then by creating a list of nodes (not in the database) And then start with the ID that has not been used in previous import and use it as a starting ID to create a new node_andex .csv

2) If the database is already trilateral In existence, do not rebuild that tripartite, as a result of which a duplicate result would be when running a cyber query against the database.

It seems as though the same issue has been raised here too:

Thank you!

This will automatically add the first free ID to the graph

2- For specificity, why you

here you can check the references: < / Div>

java - Further Sort an already sorted list -


I have a list of maps which I have already sorted in a way but Now I want to sort the list forward

Basic Type

  Collections.sort (list, new comparison & lt; map & lt; string, object & gt; & Gt; () {@Override compare public int (map & lieutent; string, object & gt; m1, map & lt; string, object & gt; m2) {return m1.get ("type"). ToString (). Compare Switch to (m2.get ( "type"). ToString ()); // type 1 or 0}});   

Now I order what I want to do, but I want to sort that list forward with the previous names. Do I have to divide it into 2 lists, a list of type 0 and other type with 1 then add the list together?

Basically, I want to repeat a SQL type, where I'll type in type ASC, last name ASC and sort me a sort of sort sorted sort by last name Would like to do

You can:

  int compareType = m1 Get ("type") ToString () compareTo (m2.get ("type") toString ().); If (compareType! = 0) {return compare type; } Return m1.get ("name"). ToString () Compare (m2.get ("name"). ToString ());   

If you are sorting on several keys, then it will be cleaner:

 for  (string key: new string [] {"type", "Name"}) {Int compare = m1.get (key) .toString (). Compare (m2.get (key) .toString ()); If (comparison! = 0) {compare comparison; }} Return 0;    

Can I use C++ as a full-featured development language for Windows Phone 8? -


I'm a C ++ developer with experience, and now I want to get some experience in the development of Windows Phone 8. I am interested that I will be able to use WinPhone 8 for any type of application development using C ++? Or is there only limited support in this environment of C ++ and I have to learn C #?

Yes you can use it as a primary development language, it is being said that Your experience will be much better if you use C #, because you intend to use the development tool (WPF Designer) In addition to the industry I think that you will work hard to find people who are General Purpose Apps written in ++, because you want # Do not like.

Returning an object from a function C++ -


Let's say that I have a variable that I have indicated for an object. For this example, suppose That I have an object that represents a card, which has 2 members - rank and suit.

Next, when I said I started that object structure, so now I have a card object with rank and suit.

My question is, should I have a function that I created the object of this card: I want to do something like this:

  Card * PlayerCard = foo ()   

I know that the player is pointing to the card card object, does it mean that the FU () also has to return the card object? Is there another way for this problem?

Actually I want to make my work card and the player card should be equal to what is generated. I do not know if it is the most straightforward approach to returning a problem to return the problem, so I am asking whether there is any alternative solution.

Thanks for the help!

I'm progressively going from bad to good way

First of all, there is a wrong way to do this:

  card * foo () {card C; Return and C; }   

Definitely do not do this card c at the end of foo And therefore the returning indicator will point to the invalid object.

You can

  card * foo () {return the new card}; }   

The card made by the new card () is the dynamic storage period, so it is not destroyed at the end of foo The returned indicator is still pointing to that card. Then you can use the pointer and can be safe.

However, there is another negative side of it, it is not clear to the person who calls foo , but they delete to return to the indicator Code> to ensure that there is no memory leak, instead it is best to use smart pointer to pass the ownership to the caller:

  std :: Unique_ptr & lt; Cards & gt; Foo () {return std :: unique_ptr & lt; Cards & gt; (New card ()); }   

However, if you do not need dynamic allocation at all then it is even better. Why not only return card and copy it from function? You can do this:

  card fu () {return card (); }   

Instead of specifying a pointer, you can call the function like this:

  card c = foo ();   

It definitely depends on your needs. If you want to use card * polymorphically, then you have to use an indicative approach. Otherwise you will end up breaking your card derivatives.

sql - Does NULL have a data type? -


I went to the same code as today.

  Select Audit daemon, ObjectID, Audit subdomain =   

It looks like the data type information can be linked to an empty value. Does it attach metadata to the NULL value that identifies as a specific data type?

Tells a way to detect data types in SQL Server, but when I try the following line, it comes back as a tap:

  Vastar (20)) as cast cast (SQL_VARIANT_PROPERTY (convert (INT, NULL, 'bassette'))    

In SQL Server, NULL one INT by default, in all the scenarios I can think you can define it with the following code:

  SELECT x = NULL INTO #x; EXEC tempdb..sp_columns '#x';   

Result: TABLE_QUALIFIER TABLE_OWNER TABLE_NAME COLUMN_NAME DATA_TYPE TYPE_NAME --------------- ------ ----- ---------- ----------- --------- --------- tempdb dbo #x___ .. X 4 int

Before you put it in a table or affiliate with a relevant metadata, what should you buy from it? Does this difference that it is INT or DATETIME or something else? What will you do with that information?

returns SQL_VARIANT_PROPERTY return NULL because this metadata and require a value for both to be meaningful (see it Use only one different type to mix):

  SELECT SQL_VARIANT_PROPERTY (NULL, 'BaseType'); DECLARE @ x ​​DATE; SELECT SQL_VARIANT_PROPERTY (@x, 'BaseType'); DECLARE @ y DATE = SYSDATETIME (); SELECT SQL_VARIANT_PROPERTY (@y, 'BaseType');   

Result:

  NULL NULL date   

So it requires both types and A value to accurately determine the base type.

Why this works in the same way, shrug You have to ask people with source code access.

Note that the NULL needs to be adopted only when you have compelled the hand of SQL Server: you have created a table based on it very well The case may be that the SQL server will return an error in this situation (and in fact in many cases where you think the data type means). The way to avoid this is not to create situations where SQL Server has to guess (which is why I asked, what would you do with this information?).

AngularJS and ng-grid - auto save data to the server after a cell was changed -


My use case is very simple A user, after editing a cell (enableCellEdit: true), the data is " "On the server (on cell blur) I tried different methods but none of them is working properly. I have a minimum grid:

  // ng-grid $ scope.gridOptions = {data: 'question', enable cell selection: correct, selected items: $ scope.selectedRow, multiSelect: False, columnDefs: [field: 'id', display name: 'id'}, {field: 'name', display_name: 'name'}, {field: 'answer [1] .valuePercent', displayName: 'rural' Enabled: edit: true}]};   

For example, I tried to see the data model sent to the grid. But by doing this I will not return the edited cell:

  $ scope $ Watch ('myData', function (foo) {// myModel. Update ()} is true);   

I tried to bellow with the "ngGridEventData" data event but editing the cell

  $ scope $ ('NgGridEventData' function (E, GridID) {// myModel. Update ()}); Finally, I tried a cell for the supervisor. However, it works only for one line by the mean of the grid's "selectedCell" property:  
  $ scope.selectedRow = []; $ Scope.gridOptions = {selectedItems: $ scope.selectedRow,} $ scope $ Watch ('selectedRow', function (foo) {console.log (foo)}, true);   

Is it necessary? I can not believe that this is nothing from the box.

Do you have an indicator / snippet that I can save myself / send to the server? Perhaps this is new, but the NG-Grid actually publishes events that make a simple change on the basis.

Event reference:

Example code (add to the controller where you set up the grid):

 < Code> $ scope. Find the underlying data / changes that force $ On ('ngGridEventEndCellEdit', function (evt) {console.log (evt.targetScope.row.entity); // line, and send the unit to the server});   

One thing to note is that even if no changes have been made, the event will trigger, so you can check the changes even before sending the server (eg. 'NgGridEventStartCellEdit')

export - Add row to 'Break up a SQL Server 2008 query into batches' -


I have been able to export a flat file with the help of BCP.

Now I have to add one (or two) rows to each batch, it is necessary to "offset" the total amount of $ so that each batch is left to zero. For example, I have 2,501 records in the table, amounting to $ 100 in 2,500 and all are booked in # 70000 accounts so that the total is $ 250,000. The final record, # 2,501, is booked in the account of # 80000 and its value is ($ 250,000); Therefore, the total table balance

Since our new system allows batches of only 950 rows, I have to divide the output using the code given above. Works great, BTW but after carrying "Balance" to zero for each batch, I have to add one row to each batch, and in Set of Account (# 80000, for example).

I hope that it makes sense to any person!

"post -The text "itemprop =" text ">

It seems that after each batch you should enter a new record. And, another suggestion that you have posted, is using 'Insert in Table ... Selection ...', it is slower than 'Selection ... in the table' and 'Select in Table' automatically Will create a table for you. After successfully batch each batch, you can automatically drop the created table. You can also remember what you have done.

Custom R restart function that doesn't abort -


Apply invokeRestart ("muffleWarning") in muffleWarning

post text after

  e & lt; -expression (Warning ("Step 1", Instant. =) Correct Warning ("Step2", Instant. = TRUE)}) R & lt; Print (cum) # 1 invokeRestart ("mymuffleWarn", co)}), mymuffleWarn = function (co) print (conditionMessage (co)) with <>  - withRestarts (withCallingHandlers (eval (e), warning = function (cum) Code>  

I get the output (# 1 from) for the first warning but if I change mymufflewarn with mufflewarning all Outputs are printed (cum) (in invokeRestart ) .

Thanks

R indicates the source code:

  .signalSimpleWarning & lt; --internal (.dfltWarn (message, call)), muffleWarning = function () zero) -   

that is being asked from <

  static void vsignalWarning (SEXP call, constant four * format, va_list ap) {four buf [BUFSIZE]; SEXP Hooksim, HK, QCol; Huksim = Install ("Signalcumle Warning"); If (SYMVALUE (hooksym) = R_UnboundValue & amp ;! SYMVALUE (R_QuoteSymbol) = R_UnboundValue) {defense (qcall = LCONS (R_QuoteSymbol, LCONS (phone, R_NilValue))); Protection (hcall = LCONS (qcall, R_NilValue)); RVSN print (buff, buffetes - 1, format, ap); Hcall = LCONS (Mkstring (buff), hkol); Protection (hkol = lcns (hookusim, hkol)); Evil (HK, R_ Global ANV); Unsafe (3); } V WarningCol / Dfttt (call, format, AP); }   

which is called

That function is used to generate warnings in C code, and it is also called the do_warning which is a function which is WARNING < >

java - Play Framework 2.1: Overriding configuration file programmatically in Global settings -


I am working to develop the multi-tenant Play Framework 2.1 application. I intend to override the On-Rivest method of the GlobalSettings class to load and set a custom configuration based on the request subdomain. The problem is, I do not know how this would be possible in Play 2.x.

When I start the server, I can override system properties on the command line, but how can I do this program in Java code? For each request

code will appear something like this (I think):

  @override public play.mvc.Action onRequest (request request, method actionMethod) {/ / See configuration settings in the cache / if not in the cache: // Load the appropriate configuration file for this subdomain (java.io.), depending on the subdomain // (ie cash.Ast ("subdomain.can")). File) // Set a new configuration from the file for this request // Request a new thread from the cache // // Cash to configure for future use in the configuration. Super.onRequest (request, verb method); }}   

The url is easy to find and to set up the cache, but I can not understand how to set a new configuration program for Play Framework 2.1 and the documentation is a bit light. Things

Any thoughts? Does anyone know a better and more efficient way to do this?

So, in a way intersection, I used multi-tenant using Scala Global Built the basis for the app. Using filters can be a more effective way to implement it, but I think it seems that it is still working. It is not easily implemented in Java.

Rather than using the configuration file, I am using the database. I think it would be more efficient to use a significant value cache, but it works for now.

In Global.scala:

  Object Global Global Advertising Settings {Override def onRouteRequest (Request: RequestHeader): Option [Handler] = {if (request.session.get) ("Site"). IsEmpty) {val id = models.Site.getSiteIDFromURL (request.host) request.session. ("Site" -> ID)} super.onRouteRequest (request)}} And then, of course, you can use a database model to query the site based on the request domain Create and / or Session session set in the request If anyone knows a better way then I would love to hear it.   

java - Custom Matcher in Simple Framework works to deserialize but not serialize -


I am trying to make it simpler to play with XMLGregorianCalendar. In doing so, I have created a maiture and have transformed:

  Applies the public class MyMachterMature {@Override public transform & lt ;? & Gt; Match (@SuppressWarnings ("raw type") last class type) throws an exception {if (type.equals (XMLGregorianCalendar.class)) {Return New XMLGregorianCalendarTransform (); } Return tap; }}   

and

  public class XMLGregorianCalendarTransform tool conversion & lt; XMLGregorianCalendar & gt; {@ Override public XMLGregorianCalendar (the last string value) throws exceptions {Returns DatatypeFactory.newInstance (). NewXMLGregorianCalendar (value); } @ Override public string write (final XMLGregorianCalendar value) throws exception {return value.toXMLFormat (); }}   

When this code is used to deserialize, then it works very well:

  final serial arrow serializer = new insistor ( New MimeTech ()); Obj = serializer.read (type, new bytereinputstream (xml.getBytes (charset name (UTF8_ENCODING)))); Unfortunately, when I try to use it to serialize it does not work, it throws  fails to create an XML string for the object Org.simpleframework .xml.transform.TransformException: class com.sun.org.apache.xerces.internal.jaxp.datatyp e.XMLGregorianCalendarImpl not supported  error, the method of writing my conversion is never called).  

Here is the code that I use to serialize:

  last byteOrputationBas = new byteOnputStream (); OS = new data overputstream (Baoos); Final Serializer Serializer = New Insulator (New MimeTech ()); Serializer.write (this, OS); Os.flush (); XmlString = New String (Bao 2. Betteere (), Charset.FireName (UTF8_ACCOIDIG));   

Writing method throws exceptions I have used as a reference, and it got me to work deserialization, but now I'm stuck. I'm not sure how to move forward.

Any help is appreciated.

It has been found that the answer was in question. Error XMLGregorianCalendarImpl is not supported. It does not have to check my mileage. I just had to change:

  if (type.equals (XMLGregorianCalendar.class)) {< / Code>  

to

  if (XMLGregorianCalendar.class.isAssignableFrom (type)) {  

I hope it's someone helps.

.net - dictionary.Keys.Add? -


। नेट में, IDictionary & lt; K, V & gt; परिभाषित करता है .Keys और .values ​​ गुण, जिनमें से प्रत्येक ICollection के बजाय IEnumerable & lt; & gt; है, जो ऐसा लगता है कि यह एक

या IDictionary & lt; K, V & gt; ?

.values ​​ = "पाठ">

नहीं, शायद कोई उचित उपयोग केस नहीं। इसके लिए बहुत कम (संभवत: शून्य) वैध कारण हैं।

यह शब्दकोष & lt; टीके, टीवील्यू & gt; क्लास एक KeyCollection देता है < कोड> .कीएं बदले में नॉनसमर्थित अपवाद के साथ "किसी कुंजीयन को एक शब्दकोश से प्राप्त किए जाने की अनुमति नहीं है।" जब भी इसे सीधे जोड़ना चाहते हैं मैं सोचता हूं कि यह विरासत के कारणों के लिए एक आइकलेंक देता है और संभवत: अब सभी कीमतों से बचा जाना चाहिए।

वास्तव में जब तक आइकलिंग .कीज में इसके युक्त IDictionary का संदर्भ था, मैं कुछ भी उपयोगी नहीं देख सकता। आइकलिंग का जोड़ें को IDictionary को बताएं कि यह क्या जोड़ता है शायद आप एक सेट के कुछ फार्म को लागू करना चाहते थे, आप ऐसा कुछ कर सकते हैं:

  सार्वजनिक वर्ग स्ट्रिंगसेट: IDictionary & lt; स्ट्रिंग, इंट & gt; {निजी रीडोनली डिक्शनरी & lt; स्ट्रिंग, इंट & gt; _InternalDictionary = नया शब्दकोश & lt; स्ट्रिंग, int & gt; (); सार्वजनिक int इस [स्ट्रिंग कुंजी] {प्राप्त {वापसी _InternalDictionary [कुंजी]; } सेट {_InternalDictionary [key] = मान; }} निजी स्ट्रिंग कॉलेक्शन _ कीज़; सार्वजनिक आइकलेंक्शन & lt; स्ट्रिंग & gt; कुंजी {प्राप्त करें (यदि (_Keys == नल) _Keys = नया स्ट्रिंग कलेक्शन (यह); वापसी _ कीज़; }} ICollection & lt; स्ट्रिंग & gt; IDictionary & lt; स्ट्रिंग, इंट & gt; .कीज़ ({{(_Keys == शून्य) _Keys = नया स्ट्रिंग कलेक्शन (यह); वापसी _ कीज़; }} सार्वजनिक आइकलिंग & lt; int & gt; मान {{नई नॉन-इम्प्लीमेंटेड एक्सपैशन (फेंक);}} सार्वजनिक शून्य जोड़ें (स्ट्रिंग कुंजी, इंट वैल्यू) {_InternalDictionary.Add (कुंजी, मान); } सार्वजनिक बाल में शामिल हैंकुड़ी (स्ट्रिंग कुंजी) {वापसी _InternalDictionary.ContainsKey (कुंजी); } सार्वजनिक बाल निकालें (स्ट्रिंग कुंजी) {वापसी _InternalDictionary.Remove (कुंजी); } सार्वजनिक bool TryGetValue (स्ट्रिंग कुंजी, आउट मान) {वापसी _InternalDictionary.TryGetValue (कुंजी, आउट मान); } सार्वजनिक शून्य साफ़ करें () {नया नोटिफाइड अपवाद डाल दें} } सार्वजनिक शून्य जोड़ें (कुंजी वैलपियर & lt; स्ट्रिंग, एट & gt; आइटम) {नया नॉन इमिलेटेड एक्सपेशेशन (फेंक); } सार्वजनिक बाल में शामिल हैं (कीवाल्यूअरपीयर & lt; स्ट्रिंग, एट & gt; आइटम) {नया नोटिफाइड अपेशन फेंकना; } सार्वजनिक शून्य प्रतिलिपि (कुंजीवैलपेयर & lt; स्ट्रिंग, एट एंड जी; [] सरणी, int arrayIndex) {नए NotImplementedException को फेंको; } सार्वजनिक बाल निकालें (कीवाल्यूपायर & lt; स्ट्रिंग, इंट & gt; आइटम) {नया नॉन इमिलेटेड एक्सपशन (); } सार्वजनिक int गणना {get {return_InternalDictionary.Count; }} Public bool isReadOnly {get return false; }} सार्वजनिक आईएनएनामेटर & lt; keyvaluePair & lt; स्ट्रिंग, इंट & gt; & gt; GetEnumerator () {नई NotImplementedException () को फेंकना; } IEnumerator IEnumerable.GetEnumerator () {वापसी GetEnumerator (); }} सार्वजनिक वर्ग स्ट्रिंग कलेक्शन: आइकलिपेक्शन & lt; स्ट्रिंग & gt; {निजी रीडोनली स्ट्रिंगसेट _ContainingSet; सार्वजनिक स्ट्रिंग कलेक्शन (स्ट्रिंगसेट सेट) {_ContainingSet = set; } सार्वजनिक शून्य जोड़ें (स्ट्रिंग आइटम) {यदि (_ContainingSet.ContainsKey (आइटम)) _ContainingSet [आइटम] ++; अन्य _ContainingSet [आइटम] = 1; } सार्वजनिक बाल में शामिल है (स्ट्रिंग आइटम) {वापसी _ContainingSet.ContainsKey (आइटम); } सार्वजनिक बाल निकालें (स्ट्रिंग आइटम) {नया नोटिफाइड अपवाद फेंकना; } सार्वजनिक शून्य साफ़ करें () {नया नोटिफाइड अपवाद डाल दें} } सार्वजनिक शून्य copyTo (स्ट्रिंग [] सरणी, int arrayIndex) {नया NotImplementedException फेंकना; } सार्वजनिक int काउंट {get {_ContainingSet.Count; }} Public bool isReadOnly {get return false; }} पब्लिक इनिमेटरेटर & lt; स्ट्रिंग & gt; GetEnumerator () {नई NotImplementedException () को फेंकना; } IEnumerator IEnumerable.GetEnumerator () {वापसी GetEnumerator (); }}   

निश्चित रूप से इसे लागू करने का एक बेहतर तरीका है या आपकी विशिष्ट आवश्यकताओं के समान है। इसका एकमात्र लाभ है वापस लौटा कुंजी स्ट्रिंग कॉलेक्शन पर। मैं वैसे भी माता-पिता StringSet वर्ग का उपयोग करने के लिए लोगों को अपने StringSet का उपयोग करने के लिए बाध्य करना चाहता हूं लेकिन, यह संभव है कि कोई उपरोक्त अधिरोहित व्यवहार चाहता है।

इसे इस पर कॉल करें:

  var set = new StringSet (); Var कुंजी = सेट.केए; keys.Add ( "हैलो"); keys.Add ( "हैलो"); keys.Add ( "दुनिया"); डीबग। प्रिंट ("हैलो: {0}, विश्व: {1}", ["हैलो"] सेट करें, ["विश्व"] सेट करें;    

javascript - event handler in ASP -


I have a page where an administrator can view all user information and edit it with an update button (form post) Can do. But I need a button at the top that logs in as the user who logs out to the administrator and logs in as that user and the user uses the land on the home page. I was wondering if we can handle that button event? I am new to this and after searching for a few hours on the web, I came to know that it is easy to handle events in ASP.net, but the classic ASP is in its hard work.

I found this

and tried but did not work.

Please help me.

client side - button

  & lt; Form method = "post" action = "MyLoginAsUserEventHandlerPage.asp" & gt; ... & lt; Input type = "submit" name = "btnLoginAsUser" value = "login as user" /> & Lt; / Form & gt;   

Server side:

  & lt;% ... if trim (request form ("btnLoginAsUser") & amp; "" & Lt; & Gt; The "button" was clicked on - finish the job ...%> ...    

javascript - How to Set Fixed-Position Element Height to Reach Bottom of Browser Window? -


I have a header on the top, a sidebar on the left, and there is a main content area on the right. A simplified version can be seen.

Styling in the sidebar is status: fixed so that it does not scroll with the rest of the page. It works but I also need a sidebar if its content is too long, to scroll.

This is possible only if I can set the right height for the sidebar. But I can not find any way to set this height. 100% is close, but it is too long because the sidebar starts below the header.

Is there no way to fix this? I'm open to either a CSS or Javascript / jQuery solution.

I think I will post it, because it starts working:

  div # header-div {height: 90px; Background color: lime; Margin: 0; } Div # Fixed-div {Status: fixed; Left: 0; Top: 0; / * & Lt; & Lt; & Lt; No offset * / bottom: 0; / * & Lt; & Lt; & Lt; Drag downwards for height * / Margin: 120px 0 0; / * & Lt; & Lt; & Lt; Give it 120px top * / width: 260px; Background color: silver; Overflow-y: scroll up; }   



How to pass a whole dojox.grid.DataGrid store(items json data) to servlet? -


I have a button on the page - when clicked, it sends all the data into the servlet, I can update data. My question is how to pass the whole store as service data, JSN data? Is there an easier way? Thanks

Here are some code that I wrote to store in an object. Then it can be converted to JSON using dojo.toJson (obj); I originally learned about this (give credit where credit is needed). I realize that this code is too big and dirty. When I saw a better way about a year ago, I could not find any one.

  JsonHelper.storeToObject = function (store) {var object = []; Var Index = -1; Store.fetch ({onItem: function (item, request) {object [++ index] = JsonHelper.itemToObject (store, item);}}); Return item; }; JsonHelper.itemToObject = Function (Store, Item) {// store: // Datastore Item came // item: // Item in question var obj = {}; If (item & amp; amp; amp; amp; amp; amp; amp; amp; store; //) property = store.getAttributes; If (attributes & attributes lang> gt;) {var i; For (i = 0; i & lt; attributes.length; i ++) {var value = store.getValues ​​(items, attributes [i]); If (value) {// handle multi-layered and only values ​​(values.length & gt; 1) {var j; Obj [attributes [i]] = []; For (j = 0; j & lt; values.length; j ++) {var value = value [j]; // Check that the value is not another object if it is //, then process it as an item (store.isItem (value)) {obj [attributes [i]]. Push (itemToObject (store, value)); } And {obj [attributes [i]]. Push (value); }}} And {if (store.isItem (value [0]) {obj [attributes [i]] = itemToObject (store, value [0]); } And {obj [attributes [i]] = value [0]; }}}}}} Return obj; };    

javascript - Dynamic PHP URL Ajax Load URL -


The problem is the difficulty in getting the maximum of PHP and giving it an ASX to make a mysql update.

  $ Ajax ({url: '../mysqlusercount.php?f=ll&users='<?php $ _SESSION [' user ']? & Gt; Data type:' Jason ', success: function (info) { },});   

This version does not work, can anyone help PLS?

wrong row

  url: '../mysqlusercount.php ? F = ll & amp; users = '& lt;? Php transcript $ _SESSION [' user ']? & Gt ;,   

should be

  url: "../mysqlusercount.php?f=ll&users=<?php $ _SESSION [ 'User']? & Gt;,    

jquery - Making a DIV hide if viewport drops below set width -


I have been working / searching for this specific idea for some time, but I can not find a solution

Actually I'm working with a WordPress plugin where a part of the content is shown, and it works fine except for mobile devices.

I am trying to fix it when the viewport hits a certain width and hides the div.

This is what I have done:

  & lt; Script & gt; JQuery (document) .ready (function) {var screen = $ (window) if (screen.width () <800) {$ ("# caregrabber"). Hide ();} else {$ ("# AttentionGrabber "). Show ();}}); & Lt; / Script & gt;   

It is assuming that #attentionGrabber is the Diva which I am trying to control.

I think that is the easiest way to show or hide it on the viewport basis, but it does not look like when I put that code on top.

If you have some events so that the size of the screen is changed, then your function will continue.

  & lt; Script & gt; JQuery (document). Reset (function () (var screen = $ (window) if (screen.width () & lt; 800) {$ ("# caregrabber"). Hide ();} else {$ ("# attentionGrabber"). ();}}); & Lt; / script & gt; Actually, however, I go this route:  
  @ media screen and (max-width: 799px) {#attentionGrabber {display: none}}   



php - Delete a cached file with a spesific Uri in symfony2 -


When I use HTTP cache for a custom page, under Symfony2 cache folder creates a file for it And it is possible to set this timeout for this cache but when I update some of my database information which is related to that particular page, my users are unable to see the change (based on the cash lifetime). To solve this problem I want to delete a particular file in the update action with the URI of that page. Symphony says in the book: "The most specific way is to request a specific purge HTTP method to clean the cash for a particular URL." But how can I create a full HTTP method from within my symphony controller? Is this possible? Or is there another way?

The built-in reverse proxy cache is probably not the best location. This type of caching is the best description of this cache. - Those who do not use to store things that should be manually declined, it will save you many headaches.

If the database you are viewing is heavy then use , using the theory and its response in the middle of the cache Or to apply,

matlab function to python function conversion -


मेरे पास एक matlab फ़ंक्शन है

  function [indx, indy] = coord2index (hres, Vres, hdiv, vdiv, x, y) इंडक्स = hdiv + x + 1; इंडी = -1 * y + vdiv;   

मैं इसे अजगर फ़ंक्शन में कैसे रूपांतरित कर सकता हूं।

I गलत हो सकता है लेकिन आपने यह कोशिश की है:

  def coord2index (एचआरएस, वीआरएस, एचडीआईवी, वीडीआईवी, एक्स, वाई): रिटर्न एचडीआईवी + एक्स + 1, (-1) * वाई + वीडीआईवी   

आप पर अधिक पढ़ सकते हैं

Android - detect rooted device in C/C++ code -


In Java code there are several samples of Android device detection, I have to do this in C code by GN of course) No examples could be found. Please help. Thank you.

After the research, something found, in the JNI code: the system ("echo" test "">

  1. 512 on the Routed Device, 512 contains error code 2 (the major error).
  2. 256 Returns on 256 unrated devices, Error code 1 (minor error) Permission denied.

    return error 512 should be examined, is it enough to say that the device is root?

    You can do something simple.

    In Java The flag is to determine if the phone is the root.If yes, then when you call the JNI signal, then flag this flag, then you can handle the code flow for the root / non-route in the root. .

ios - Inserting image in to Database using sqlite in xcode4.6 -


text after "itemprop =" text ">

im working on im image in database using SQLite in Xcode 4.6, I just insert Text field and UIImageView (with dynamically generated barcode images)

Unfortunately getting im "Error: Out of memory".

I'm using the code while listening, tell me where my fault is & amp; Let me know for more information

* 1. Database creation *

  - (zero) createoropendb {NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory , NSUserDomainMask, yes); NSString * docpath = [path objectwithoutx: 0]; Dbpathstring = [Dockpath stringBapensitting path component: @ "Database DSDB"]; Four * error; NSFileManager * Filemanager = [NSFileManager defaultManager]; If (! [Filemaner xxtists atpeth: dbipithstring]) {casts four * dbipith = [dbpithstring utf 8 string]; (Sqlite3_open (dbpath, & barcodeDB) == SQLITE_OK) If {constants four * sql_start = "table creation does not exist, then DBTABLE1 (naming text unique, imageUrl blob)"; NSLog (@ "DB made"); Sqlite3_exec (barcode, sql_start, NULL, NULL, and error); Sqlite3_close (barcodeDB); }}}   

* 2. Button to insert button *

  - (IBAction) saved: (id) Sender {UIImage * image = imageView.image; NSDTa * ImageData = UIImagePNG Mapping (Image); [Self images TOSQL: imageData.bytes: Uimagetext.text]; }   

* 3.Method to insert data

  - (zero) Save images TOSQL: (NSData *) imgData :( NSString *) mainUrl {const char * sqliteQuery = "Include DBTable1 (NAME, IMAGEURL) values ​​(?,?)"; Sqlite3_stmt * statement; If (sqlite3_prepare_v2 (barcodeDB, sqliteQuery, -1, & statement, zero) == SQLITE_OK) {sqlite3_bind_text (statement, 1, [mainUrl UTF8String], -1, SQLITE_TRANSIENT); Sqlite3_bind_blob (statement, 2, [IMGDATA bytes], [length of IMGDT], SQLTITINSIISInt;); Sqlite3_step (statement); NSLog (@ "saved image successfully"); } Else {NSLog (@ "SaveBody: Failed from sqlite3_prepare_v2. Error:% s", sqlite3_errmsg (barcodeDB)); } // final and close database sqlite3_finalize (statement); }    

return code (which is not SQLITE_OK ) undoubtedly is returning to SQLITE_MISUSE , which means that you are trying to use a database that you have not yet opened and is creating your createoropendb If the database is not present, but if it exists, then you are not opening it (and even if it is present, you are closing it after making it).

If you call sqlite3_prepare , then the database will not be opened, then the function will return to SQLITE_MISUSE , sqlite3_errmsg < / Code> will return a misleading "out of memory" text message.

php - mysql_fetch_array() boolean given unable to find error -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 33 उत्तर

    मुझे अब ये मिल रहा है एक और समस्या फिक्सिंग के बाद मेरी त्रुटि लॉग मैंने स्टैकेवरफ्लो पर सब कुछ देखा है और जो भी मैं आया हूं वह एक त्रुटि प्रदर्शित करने के लिए है, समस्या यह है कि मुझे त्रुटि पता नहीं है, इसलिए मैं इस तरह से इसका निवारण नहीं कर सकता। क्या कोई मुझे कुछ मार्गदर्शन देने में सहायता कर सकता है? मैं एक डुप्लिकेट करने की कोशिश नहीं कर रहा हूं, मैं वास्तव में समझने की कोशिश कर रहा हूं कि क्या हो रहा है, खेद है अगर यह गलत है (और अगर यह कृपया मुझे बताएं!)

    यह त्रुटि है: [बुध मार्च 27 01:36:41 2013] [त्रुटि] PHP चेतावनी: mysql_fetch_array () पैरामीटर 1 संसाधन होने की उम्मीद है, बूलियन 574 [बुध मार्च 27 01:36:14 2013] [त्रुटि] PHP चेतावनी: mysql_fetch_array () उम्मीद है कि /nas/wp/www/cluster-1434/XXXXXXX/wp-content/themes/mytheme/functions.php में दिए गए हैं

    यह पंक्ति 572: पैरामीटर 1 संसाधन होने के लिए, / nas/wp/www/staging/XXXXXXX/wp-content/themes/mytheme/functions.php पर दिए गए बुलियन /

    $ ll = mysql_fetch_array ($ getLL);

    यह पंक्ति 574 है:

    $ cou = mysql_fetch_array ( $ GetCount);

    यहां कोड है:

      & lt;? Php $ con = conDB (); $ X = 0; // यदि (झूठी === ($ zip = get_transient ('distinct_zips'))) {$ getZips = mysql_query ("चुनें स्पष्ट (meta_value) से wp_postmeta WHERE meta_key = '_gmap_zip'", $ con); // $ zip = mysql_fetch_array ($ getZips); // set_transient ('distinct_zips', $ ज़िप, 60 * 5); //} जबकि ($ zip = mysql_fetch_array ($ getZips)) {$ getLL = mysql_query ("चयन करें * से ज़िपकोड्स जहां ज़िप ="। $ Zip ['meta_value'], $ कॉन); $ Ll = mysql_fetch_array ($ getLL); $ GetCount = mysql_query ("चुनें संख्या (*) से wp_postmeta WHERE meta_key = '_gmap_zip' और meta_value ="। $ Zip ['meta_value'], $ कॉन); $ Cou = mysql_fetch_array ($ getCount); $ Zipvalue = $ zip ['meta_value']; $ GetNewest = mysql_query ('से चुनें * wp_postmeta जहां meta_key = "_gmap_zip" और meta_value = "'। $ Zipvalue। '" LIMIT 5', $ con); अगर (strlen ($ ll ['lat'])) {? & Gt;   

    आपकी सभी मदद के लिए अग्रिम धन्यवाद!

    प्रश्न : <पूर्व> $ getLL = mysql_query ("चुनें * ज़िपकोड्स से ज़िप ="। $ Zip ['meta_value'], $ कॉन); $ GetCount = mysql_query ("चुनें संख्या (*) से wp_postmeta WHERE meta_key = '_gmap_zip' और meta_value ="। $ Zip ['meta_value'], $ कॉन);

    झूठे लौटने में असफल रहे हैं, जिससे उन दो चेतावनियों को प्राप्त किया जा सकता है।

    प्रश्नों के साथ काम करते समय अंगूठे का सामान्य नियम हमेशा त्रुटियों की जांच करना चाहिए आप चलकर ऐसा कर सकते हैं:

      यदि (! खाली (mysql_error ())) / / त्रुटि    

icalendar - Reading a webcal URL in ruby on rails -


I am trying to parse a webcal link

  webcal: // Www.facebook.com/company / BPPP in Rails app UID = 13301632 and AG = Adamgagaeg   

so I can customize event entries. I have seen in both but not a calendar feed (webcal: //) showing no support for reading.

Are there any railway libraries that help in parsing webcail addresses? If not, how should I go about making my paras?

Webcal is just an unauthorized URI scheme Access to Icalendar documents You can get HTL using Calendar And can parse it using one of several Icarusin plugins:

  is required 'net / http' uri = URI ('http://www.facebook.com/ Ical / B.php? Uid = 13301632 & amp; key = asdgagaweg ') Calendar = Net :: HTTP.get (uri)   

For alternative methods of obtaining http requests: < / P>

Then your favorite plug-ins Received parse the response by using:

:

  cal = icalendar.parse (calendar). First   

:

RiCal.parse_string (calendar). First

C# Throw exception without breaking the loop -


  शून्य फ़ंक्शन () {try do some foreach (itemList में आइटम) {try {// do कुछ} पकड़ (अपवाद पूर्व) {नई अपवाद फेंक ("functionB:" + पूर्व। संदेश); }}} पकड़ (अपवाद पूर्व) {LogTransaction (ex.Message); }}   

नमस्ते, मैं लूप के अपने माता पिता को अपवाद को फेंकना चाहूंगा। वर्तमान में जब लूप में एक अपवाद है, तो लूप को समाप्त कर दिया जाएगा। क्या कोई वैसे भी इसे संशोधित करने के लिए है, जिससे अपवाद फेंक दिया जाएगा, लेकिन लूप जारी रहेगा?

नहीं, आप पाश से एक अपवाद फेंक सकते हैं और इसे फिर से चलना जारी रख सकते हैं। हालांकि आप अपने अपवाद को सरणी में सहेज सकते हैं और लूप के बाद उन्हें संभाल सकते हैं। इस तरह:

  सूची & lt; अपवाद & gt; लूप अपवाद = नई सूची & lt; अपवाद & gt; (); विदेशी वस्तु (आइटम वस्तु में विविध वस्तु) का प्रयास करें {// कुछ करना} पकड़ (अपवाद पूर्व) {loopExceptions.Add (ex); } Foreach (पाश पूर्व में लूप एक्सक्शंस) // उन्हें संभाल    

XSLT - xsl choose -


I have a problem, I have to choose two parameters in XSL match, is there a way to get it?

For example: xsl: When test = i needs to examine two parameters, then I can check the same price but less than without ordering.

  & lt; Xsl: select & gt; & Lt; Xsl: when test = "value = 10" & amp; Amp; "Order type = 'P'" & gt; & Lt; Td bgcolor = "# ff00ff" & gt; & Lt; Xsl: Select Value = "Artist" /> & Lt; / Td> & Lt; / XSL: When & gt; & Lt; Xsl: when test = "value = 10" & gt; & Lt; Td bgcolor = "# cccccc" & gt; & Lt; Xsl: Select Value = "Artist" /> & Lt; / Td> & Lt; / XSL: When & gt; & Lt; XSL: otherwise & gt; & Lt; Td> & Lt; Xsl: Select Value = "Artist" /> & Lt; / Td> & Lt; / XSL: otherwise & gt; & Lt; / XSL: Select & gt;    

  & lt; Xsl: select & gt; & Lt; Xsl: when test = "price = 10 and order type = 'p'" & gt; & Lt; Td bgcolor = "# ff00ff" & gt; & Lt; Xsl: Select Value = "Artist" /> & Lt; / Td> & Lt; / XSL: When & gt; & Lt; Xsl: when test = "value = 10" & gt; & Lt; Td bgcolor = "# cccccc" & gt; & Lt; Xsl: Select Value = "Artist" /> & Lt; / Td> & Lt; / XSL: When & gt; & Lt; XSL: otherwise & gt; & Lt; Td> & Lt; Xsl: Select Value = "Artist" /> & Lt; / Td> & Lt; / XSL: otherwise & gt; & Lt; / XSL: Select & gt;    

c++ can't put data into vector -


I have a processor-class for data-structure and data, data stacked without prompt for SIMD processing Is:

  straight trojero_data {float position [3]; Float velocity [3]; Float acceleration [3]; ...}; Square trajectory_processor {private: vector & lt; Trajectory_data & gt; Tdata; Of vector & lt; Trajectory_data & gt; Default_data; ...};   

But I have actually failed to set the data set to vector, neither of those tasks:

  trajectory_processor :: trajectory_processor () {/ / Returns error: there is no match for any operator ??? In ... trajectory_data d0 (); Default_data [0] = d0; // returns error: no matching function to call to call // stat :: vector & lt; Trajectory_data & gt; :: push_back (trajectory_data (& amp;) ()) trajectory_data d1 (); Default_data.push_back (D1); }; According to   

and I thought it should be easy, but after many Google searches I still could not find any answer.

This project includes cross-coding HTML / Javascript and I think that when I go back to C ++, then it starts wearing on my nerves. "Text">

You think that, in fact, line

  trajectory_data d1 ();   

Actually declaring a function D1 which does not take any arguments and returns a trajectory_data object.

Change it

  trajectory_data d1;   

Your problem should be fixed, as well as the default constructor for d0 will be asked anyway, () .

java - Use method to compare lists -


I am trying to use a method to compare different lists of T2O. In fact, I want to pass two separate lists in a method which would be right or wrong if the elements of an array list use the other. It just gives the truth - and I'm not sure why I should make this false mistake if someone can help me understand this, then it would be great.

  Public category array list test {public static zero main (string [] args {list & lt; String & gt; List1 = New Arrestist & lt; String & gt; (); & Lt; String & gt; List2 = New Arrestist & lt; String & gt; (); List1.add ("cat"); List1.add ("dog"); List1.add ("zebra"); List1.add ("lion"); List1.add ("mouse"); // test value //list2.add("cat "); List2.add ("Lizard"); Boolean doesitcontain = contains (list 1, list2); Println (doesitcontain); } In public stable boolean (list & lt; string & gt; list1, list & lt; string & gt; list2) {Boolean warm content; For (int i = 0; i   

I think your method should be rewritten: In Public Stable Boolean (list & lt; string & gt; list1, list & lt; string & gt; list2) {return list2.containsAll (list1);}

You currently only code The last element of list1 is also in list2 . If you are actually any , Then this would be a simple solution:

  in public stable boolean (list & lt; string & gt; list1, list & lt; string & gt;; list2) {For (string str: list1) {if (list2.contains (str)) {back true;}} description is false; }    

Read from xml to string list C# -


मेरे पास ये XML फ़ाइल है:

  & lt; cteProc xmlns = "http: // Www.portalfiscal.inf.br/cte "versao =" 1.04 "xmlns: xsd =" http://www.w3.org/2001/XMLSchema "xmlns: xsi =" http://www.w3.org/2001 / XMLSchema-उदाहरण "& gt; & Lt; CTe xmlns = "http://www.portalfiscal.inf.br/cte" & gt; & Lt; infCte versao = "1.04" आईडी = "CTexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" & gt; & LT; आईडीई & gt; & LT; compl & gt; & LT; फेंकना & gt; & LT; रेम & gt; & LT; सीएनपीजे & gt; 11111111111 & lt; / CNPJ & gt; & LT; आईई & gt; 2222222 & lt; / आईई & gt; & LT; xNome & gt; Teste & lt; / xNome & gt; & LT; enderReme & gt; & Lt; xLgr & gt; xxxxxxx xxxxxx & lt; / xLgr & gt; & LT; एनआरओ & gt; S / N & lt; / एनआरओ & gt; & Lt; xCpl & gt; एरिया सी & lt; / xCpl & gt; & LT; xBairro & gt; PARQ। xxxxxx & lt; / xBairro & gt; & LT; cMun & gt; 125,455 & lt; / cMun & gt; & LT; xMun & gt; xxxxxx & lt; / xMun & gt; & LT; सीईपी & gt; 548,848 & lt; / सीईपी & gt; & LT; यूएफ & gt; ए.ए. & lt; / यूएफ & gt; & LT; xPais & gt; दी ब्राज़ील & lt; / xPais & gt; & Lt; / enderReme & gt; & LT; infNFe & gt; ** & lt; chave & gt; 1 & lt; / chave & gt; ** ** & lt; chave & gt; 2 & lt; / chave & gt; ** ** & lt; चावे & gt; 3 & lt; / chave & gt; ** & lt; / infNFe & gt; & Lt; / रेम & gt; & LT; exped & gt; & LT; सीएनपीजे & gt; 2342342342342 & lt; / CNPJ & gt; & LT; आईई & gt; 15342683242345480 & lt; / आईई & gt; ...........................   

और मुझे मूल्य प्राप्त करने और स्ट्रिंग के अंदर डालनी है < / P>

मैं यह करने की कोशिश करता हूं:

  var ListaChave = नई सूची & lt; स्ट्रिंग & gt; (); Var lista = (xDoc.Descendants में सी से (ns + "/ rem / chave") c.Value का चयन करें।) सूची (); Foreach (सूची में स्ट्रिंग एस) {मूल्य जोड़ें}}   

लेकिन s var शून्य है। मुझे ये पता नहीं है कि इन मूल्यों को कैसे प्राप्त किया जाए कोई भी मेरी मदद कर सकता है कृपया!

linq को xml का उपयोग करें

  XDocument दस्तावेज़ = XDocument.Load ("XMLFile1.xml"); एक्स-नेमस्पेस एनएस = @ "http://www.portalfiscal.inf.br/cte"; सूची के & lt; स्ट्रिंग & gt; StrList = doc.Descendants (एनएस + "रिम ')। वंशज (एनएस +" चावे ")। चुनें (ई = & gt; ई। वेल) .ओलिस्ट ();   

और वैकल्पिक रूप से, आप जैसी चीज़ें करने से अधिक नियंत्रण कर सकते हैं

android - Does a device need to be rooted in order for a background process to take screenshots -


क्या कोई डिवाइस जड़ें के बिना स्क्रीन शॉट ले सकता है?

कुछ उपकरणों पर आप जड़ के बिना फ़्रेमबफ़र को पकड़ कर सकते हैं, लेकिन ये तुलना में सामान्य नहीं हैं सामान्य में एंड्रॉइड डिवाइसेस की संख्या।

संक्षेप में, यदि आप एक विस्तृत यूज़रबेस के लिए लक्ष्य कर रहे हैं, तो आपको डिवाइस को रूट करना होगा।

phpmyadmin - mysql query to get just the 1st sentence in a paragraph -


I'm trying to copy just one sentence in a product description paragraph for a meta-detail tag Mysql For example the database. In this product description, I need 1 sentence to copy from product_description field to products_meta_description field. "Kendall Howard 8 U Compact Series SOHO server cabinet rack is ideal for IT setup with limited space. I sleek, durable design is specially designed for small businesses, home offices or IT professionals who Want to compact design without protecting your server rack devices. "

should be copied as products_meta_description:" Kendall Howard 8 U Compact Series SOHO Hwar cabinet rack setup for the limited space of IT. "

  Update products SET products_meta_description = Products_description (1 sentence only)   

Not sure how to do this I'm assuming that found in the paragraph First period (.) And everything will be available before that. BTW, I'm doing it in phpmyadmin sql query tool. There are thousands of products, so I thought it would be the easiest way to manually get the canned meta description tags entered for each product manually.

The MySQL function is ideal for:

  SET products_meta_description = SUBSTRING_INDEX (products_description, '.', 1)   

He will give you everything that comes before the first period . If you want the duration also, it is the easiest to get the result from CONCAT :

  Update products SET products_meta_description = CONCAT (SUBSTRING_INDEX (products_description, . ', 1),'. ')    

oracle - How can I figure out the value of the clicked cell in a table which was generated in ASP? -


I am generating a large table on a webapp using ASP. I ADODB Connecting to an Oracle database using Resetनेटet and filling the table with each row of data. Whenever you click on the ID number (the first column of each row), there are 15 boxes from the bottom that will fill more data than the database. Diamonds are a screenshot I apologize for censoring data, but you can see for whom I Giong am The table is filled with data, and then there is another table below, when an ID number is clicked, fill it with more information for that ID.

The problem I have is because, because the recordset is stepped through the table, it goes to the end and points to the last record in the database. I need to find a way to make this record on which I clicked so that he could get all the records of that record. How to make an idea?

In only two ways I know what you want to do.

  1. @Ad suggested using javascript. This will give you results in the table below without refreshing the page.
  2. By using VBScript, use that ID to populate that url with a query string which you want to place your bottom table. You will need to refresh a page for this.

java - Method to execute when a class instance falls out of scope? -


I have a C ++ class that is used to enter and exit the routine used.

  class myTrace {std :: string m_strName; MyTrace (std :: string strName) {m_strName = strName; _tprintf (_T ("enter \ n% s"), m_strName); }; ~ MyTrace () {_tprintf (_T ("\ n% s nickel"), m_strName); }; };   

It is easy to use, you do it for the first time, using statm mechanism. When the routine is called it print out and the entry message when the regular exit, it prints an eclipse message.

I am trying to migrate it to Java, but I want to read about the absence of all the methods I am confused about that in any way it should be done in Java Could?

- Bob Lambert -

Just in theory, you finalize the method , Therefore

  public class matches {@Override protected void finalize ()) Throwable {System.out.println ("nickel") throws; Super.finalize ();  

This garbage collector will be called when it determines that there is no more reference to the object

so when you do

  the public is stable Zero myMethod () {MyClass a = new MyClass (); } Public static zero principal (string [] args) {myMethod (); System.gc (); }   

As output you will

get rid

if I remember in C ++ Destructors The object will be destroyed for the release memory, in java we do not have to worry about it, ji is doing this for us, in most cases you do not need a destructus

java - dispatchKeyEvent calling method twice -


I have applied the sending key event in my activity to press the press key on my keyboard. The problem is that when I click, does it say my method twice? How do I fix it ? Thanks, a good day!

  @ Override Public Boolean Dispatches Event (Key Event E) {if (e.getKeyCode () == KeyEvent.KEYCODE_ENTER} {enter (); Back true; } Return super.dispatchKeyEvent (e); };    

Fixed, done this: firstly I have ACTION_DOWN But this was causing me an old problem.

  @ Override Public Boolean Dispatches Event (event event) {if (event.getKeyCode () == KeyEvent.KEYCODE_ENTER} {if (event. GetAction () == KeyEvent.ACTION_UP} {enter ( ); Back true; }} Return SuperspacePatch Event (Event); };    

.net - Generating Database Schema Script from NHibernate -


I have a NET 2008 MVC application that uses nhibernate. The previous developer did not get to create a database for this project. I'm quite new to vend, and I'm trying to figure out what would be the optimal solution for creating a database script to create a new database using the current mapping. I have gone through many posts on this site, but still do not fully understand how it is to work. Any guidance is appreciated.

Thank you!

"itemprop =" text ">

After assuming that you have the hbm.xml mapping and a valid nhibernate config file, you have a console application The following code can be used to generate SQL schema:

  // hibernate config file configuration cfg = initial configuration load () from new configuration .configure ("hibernate.cfg.xml" ); // assembly in which the hbm.xml mapping are embedded (assuming the product class is in this assembly) cfg.AddAssembly (typeof (product) .Assembly); // This executable folder will be generated in the new SchemaExport (cfg) SQL Schema file. SetOutputFile ("schema.sql") (executed incorrectly, wrong).   

If you have fluent mapping, then it should look more like this:.

  Fluently.Configure () database (MsSqlConfiguration.MsSql2005) .Mappings (M => m.FluentMappings.AddFromAssemblyOf & lt; Product & gt; ()) ExposeConfiguration (config = & gt; ; {New SchemaExport (config) .SetOutputFile ("schema.sql") executed (true, false, false) ;.}) BuildConfiguration ();    

How can I transform a true color image to a jpeg image that I can use in a variable in php -


I am trying to create a JPG image which is using image pagination, but it outputs the image in the browser And I do not want this. $ im = imagecreatetruecolor ($ width, $ height); $ Image = imagecreatefromjpeg ($ filename); Imagecopyresampled ($ im, $ image, 0, 0, 0, 0, width, $ height, $ width_core, $ height_orig); $ Im = imagejpeg ($ im, 'test.jpg', 100);

It comes as if it is not a JPP stored in $ im. I am trying to resize an image and then work with it in JPG format

In PHP, an image was created once, it has not been created once (from , ???? |): This is only a ressource.

A typical type of conversion occurs later, when you use for example, outputs the image in the browser or saves it in a file, it's all this, nothing more than boolean. Who says that the conversion was successful or not.

c# - How to exit a process by catching a mouse click? -


I'm new to C #, just starting to write some code. There is something in my mind, but before moving ahead, some help is needed on this matter. How do you get out of the running process by detecting the mouse click? I wrote a few lines but when compiled and running, the mouse click has no effect. Can anyone please help me by looking at me? Here are my lines ...

  using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; Using System.Windows.Forms; Namespot Graphic_test_1 {Public Partial Category Form 1: Form {Public Fixed Single Lim_x, lim_y; X & amp; // Limitations; Y Public Stable Int Daily = 45; System.Drawing.Pen myPen = New System. Dropping Pen (system, drawing collar blue); // Color color system. Drawing Graphics canvas; Public boolean clik = false; // Start Public String Mistress; Public Form 1 () {Initialization (); } Secure Override Zero OnMouseClick (MouseEventArgs e) {base.OnMouseClick (e); Clik = true; Lim_x = e.x; Lim_y = e.Y; } Private Zero btgo_Click (Object Sender, EventArgs E) // Drawing Start [GO] {canvas = this.CreateGraphics (); Btgo.Enabled = false; MessageBox.Show ("Checking the canvas borders. \ R \ n" + "Click anywhere to stop X position", "see coordination", message box button. OK, message box icon. ; Bitigo. Person = false; Btend.Enabled = false; MyPen.Color = System.Drawing.Color.Red; // color of color myPen.Width = 2; // Pen width system. Drawing.font drift = new system Drawing.fonts ("aerial", 10); // Graphics Font System Drawing Solidbrish MyBrush = New System Drawing Solidbrish (system, drawing collar black); // color for font system Drawing Color background; Background = this.BackColor; Lim_x = 0; // Start {canvas. Drawline (MyPain, 0, 200, Lim_X, 200); Mystring = "Current X =" + lim_x.ToString (); Mybrush.Color = System.Drawing.Color.Black; Canvas.drustring (mestring, drops, mice, 351, 334); System.Threading.Thread.Sleep (dly); Mybrush.Color = Background; // Use background color canvas. Filtrategle (mrbush, new rectangle (350, 333, 500, 353)); If (click) {mybrush.color = background; // Use background color canvas. Filtrategle (mrbush, new rectangle (350, 333, 500, 353)); Mystring = "Current X =" + lim_x.ToString (); Mybrush.Color = System.Drawing.Color.Black; Canvas.drustring (mestring, drops, mice, 351, 334); MessageBox.Show ("Last Position in X" - lim_x.ToString (), "Mouse click detected", MessageBoxButtons.OK, MessageBoxIcon.Stop); break; } Other lim_x ++; } While (lim_x <611); MyPen.Dispose (); // Release the pen Marybrush. Dizzy (); // Leave the brush canvas. Dies: (); // release canvas btend.Enabled = true; Btend.Focus (); } Private Zero btend_Click (Object Sender, EventArgs E) // Excluding Program [END] {Removal}; // program ends}}   

}

if I understand well, so you are trying to stop the ongoing process (such as BTOG click event).

To do this, you should use an individual thread to execute the process.

Why thread?

Your application will run two separate processes:

  1. Main threads
  2. second thread < / Code>

    Therefore, it is possible to identify the "mouse click" when you are running the second thread .

    Example I have a button and a label . I want to click on button1 , create and start thread it will loop thread 10000 time and Label1 will modify the text. But when I click on the label, the loop will close:

      using the system; Using System.Drawing; Using System.Windows.Forms; Using System.Threading; Public Partial Class Test: Form {thread thread; Public examination () {Initial group (); } Zero button 1_Click (object sender, event events e) {thread = new thread (new threadstart (start-thread)); Thread.Start (); } Private Zero StartThread () {for (int i = 0; i & lt; 1000000; i ++) {Thread.Sleep (1000); Label1.Invoke ((MethodInvoker) ((= = gt; Label1.Text = i.ToString ())); // See more info section, I will post a link about it }} Zero Label 1_Click (Object Sender, Event Argus E) {thread. Ebert (); }}   

    More info:

    1. You should read about how to close a thread properly .

    2. Enter the method.

Memory error reading a zip file in python -


I have a thread in which I am reading zip file with zipfile.ZipFile (). Read () , where I'm getting a memory error.

I know that read () loads the entire file in memory, after unzipping, the file size is more than 100MB i with zipfile.zipfile () Also tried ... Open (). Readlines () , but it takes a lot of time.

Is there a way that I can read the file speed without memory error?

Assume that you are trying to read a zipped text file, you can treat it An object like the file has been returned in the form of an iterator, and process it by line-by-line ...

  zipfile import from zipfile zip = zipfile ('myzip.zip ') Stream = Open to line in the ZIP stream (' myfile.txt '): do_something_with (line)    

reporting services - Multiple Reports share same sub-report -


About 5 reports were given to me to develop, and there were two sections of them all that were similar to all reports. The rest of the report was unique to each one, so I took the same class and converted them into sub-reports, then in the main reports I added a sub-report link in the order report. I have already realized the advantages such as changing the font, and it was better than once it was 5 times better. These reports are being made in BIDS and are working fully. I then took the RDL files and imported it into the CRM 2011 product, from which they will be used eventually.

It is here that my sub-report link breaks In CRM 2011, I can only select a basic report for sub-reports. So if I set Master 1 to be a parent report for two sub's, then Master 1 will be canceled. However the subreport could not be shown with the Master 2-3-4-5 error. If I set Master 2 as a parent, then Master 2 will run continuously without 2, but 1,3,4,5 will fail?

Suggesting to reconnect the parents report in the people's report .... which is not my problem

I hope I am doing something wrong only I do not have a limit of CRM 2011.

TIA

JB

The final solution based on the Guido Priest answer

The sub-report was prepared in the CRM for which they were required. However all the sub-reports in the CRM have been uploaded from the same RDL file. One MGMant described by Guido is a bit of a pain, but that is where we are involved in CRM 2011 ....

Subreports can only have one parent, this is a limit of CRM 2011.

You can always create 5 similar sub-reports, I know that it will be more difficult to maintain, but this is the only solution (you can always create a batch file when you update all the data, the second 4 rdl file to create)

c++ - What triggers Source Server to run the embedded command to get a copy of a source file? -


I am trying to set up a source index using Perl scripts included from Visual Studio 2010, and SSK (SDK) (In my case, Windows 8) use the strongest as source control

For Windows 8 SDK: C: \ Program Files (x86) \ Windows Kit \ 8.0 \ Debuggers \ x64 \ Srcsrv

From the Bruce Dawson blog (link below), it can be located here for the old SDX C: \ Program Files \ Debugging Tools for Windows (x64) \ srcsrv


My PDBs are indexing, and manually viewing PDBs, as well as running the following commands Will remove the source files properly.

  srctool -x test.pdb   

This may be how the view is connected to the studio, but my problem Files related to local editors.

  1. If I delete a file and start the debugger
    • VS A dialogue pops up that asks me to confirm that I will run the command and open the download and the source properly and I can continue the debugging
    • If I If I edit or sync a different version of a file then it does not match PDB
      • I do not get this dialog, and as a result, VS displays "no source available" window

        from MSDN site (lowly

        There is no source code on the local machine or PDB file does not match the source code , you can not add an application Can use source server to debug

        It seems that this is the second case, VS There should be reason to run the order to get the source, but it does not work for me Case # 1 works how I expected, but before it is useful I need to do case # 2 Also, I have enabled "print source server diagnostics in the output window" and I have an error Or warnings have not been received.

        Whether PDB was indexed, should this second issue trigger a download of the source file version? Or am I doing something wrong?

        Thank you!

        Edit
        This works as I expect in the Windbag, so this visual studio

        reference:

        Thank you for recognizing this problem. We have fixed the problem, and the changes will be displayed in future releases of Visual Studio (not in the 2013 update) We hope that this improves your experience with our tools and technologies.
        In particular, we have modified debugger behavior to match what WinDbg does in this case. If we do not match the debugging temporary file on the disk, we will allow you to download the source file matched from the source server.

c - How to find the indices at which strtok() splits the string? -


I was using the strtok () function in C. It gives the pointer on those places where this string splits.

  int main () {char s [100] = "ABCD"; Four * p; P = stroke (S, ""); While (p! = Null) {p = stroke (null, "."); // do something} return 0; }   

How can I get an index that is divided (preferably continuous time)?

To find the pointer:

  ptrdiff_t index = p - S;   

On one side: Show your actual code - s = "A B C D" will not be compiled.

php - sending uploaded file to another server via CURL from a CURLed page -


How many examples have I seen how to upload a file with the CRL (probably closest to what I need), but

What I'm trying to achieve : Curl a file upload form from the server, display it on surfer1. Select a file to upload via this form, submit the form, but submit it to SERVER1, press $ _POSTS and $ _FILES and then submit it to the form processing script on SERVER2 and display the results in SERVER1 .

In other words, I have an action file upload and processing interface on SERVER2, but I need to make it as everything is happening on the server.

This is like me SERVER1:

  // on the related code so loop foreach ($ k = $$ k => by submitting files. $ V) {$ settings] $ $ [$ k] = '@' ['Tmp_name']; } $ Settings = http_build_query ($ settings); $ Cookie = WP_CONTENT_DIR '/ Plugins / myPlugin / cookie.txt'; // SERVER1 is a WordPress site $ ch = curl_init ($ url); Curl_setopt ($ ch, CURLOPT_POST, true); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, $ settings); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, FALSE); Curl_setopt ($ ch, CURLOPT_USERAGENT, "Mozilla / 5.0 (Windows; U; Windows NT 5.1; N-US; RV .: 1.8.1.6) Gecko / 20070725 Firefox / 2.0.0.6"); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 60); Curl_setopt ($ CH, CURLOPT_FOLLOWLOCATION, 0); Curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ cookie); Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ cookie); Curl_setopt ($ ch, CURLOPT_REFERER, $ url); $ Response = curl_exec ($ ch);   

When I return the output $ response (which includes print_r ($ _ files), the files come in the form of an empty array and the following error occurs: Warning: file_get_contents (@ / Tmp / phpFITW6K): Failed to open stream: no such file or directory

What am I missing? I noticed that http_build_query is missing from some curl instances and passed instead of an array, but does not give me a "request request data with POST request, or the amount of data provided in the request is greater than the capacity limit. " If I

Any help would be appreciated. I was not completely sure that "http_build_query () was removed from http_build_query () and keeping '@' in front of the file name" Request request does not allow data with POST requests or provided in the request The quantity of data is greater than the capacity limit "error, but the file is now properly received and parsed on the server.

ios - UIButton only partially tappable -


So, it sounds like a strange incident. I have a UIButton with custom background image and animation that is called randomly (this is an image of the front and back). The strange thing is that only the lower part of the button is noteable. I have another button that is set in the same way, and you can tap anywhere on the image.

The background image is just a png (its transparency) but I have other buttons that are built up until you tap in the bounding box. Any ideas?

  - (zero) displaypointbutton {NSArray * pauseInfo = [self.sharedGameModel.theAssets objectForKey: @ "Boy-Annie"]; // // Maskat Button / abuttonArray has the information for a personal button in an array / / button in this sequence in this sequence is read from the // array. // 2 y position // The only image in the array is the name of the animation / so we are included in NSERRE * POS images [pauseInfo ObjectIntex: 0]; UIImage * Pauses Image = [UIImage imageNamed: [Pauses Image ObjectAddindex: 0]]; CGFloat theX = [[pauseInfo object atindex: 1] float value]; CGFloat theY = [[pauseInfo objectIntex: 2] Float value]; // Create a new destabilizing array to fill the following object / / NSMutableArray * buttonAniImages = [[NSMutableArray alloc] init] in the following loop; For (id object in paused image) {[Buttoni Images AddBect: [UIImage imageNamed: Object]]; } / / Sets a custom image for the button [self.pauseButton setImage: pauseImage forState: UIControlStateNormal]; Self.pauseButton.frame = CGRectMake (theX, theY, pauseImage.size.width, pauseImage.size.height); Self.pauseButton.imageView.animationImages = buttonAniImages; Self.pauseButton.imageView.animationDuration = 3.0; Self.pauseButton.imageView.animationRepeatCount = 1; [Self.gameScreen addSubview: self.pauseButton]; // Add action related to the button [self.pauseButton addTarget: Self-action: @Selector (no heathpausbutton :) control events: UICTrolEvent TouchUp Inside]; }   

Escroft is right There was something on the top, it was never visible on top I would add my experience if someone else has to walk on the same issue.

In my game, there are several UIViews with path animation. Their initial frames were initially set to 0,0 and then the starting points of the path were randomly adjusted. But their initial frames were covering the top part of the button.

Thanks for the people who provide feedback.

SQL Server : trying to add non-null column to an existing table (table is empty) -


I'm trying to add a new column to my exiting table, but I want to insert non-empty columns I am trying to

I understand that this will be an issue for the existing database with so many data, but there is no data in my database so why am I confused as to this error.

Is there an easy solution (I do not want to add default value)

You have two options, feed it to a default value, or add fields without a non-realistic obstacle, then change the table later, so that you can add a non-null barrier after being paranoid in the ground.

ios - Blending Two Images by edge with CI or GPUImage -


Is it possible to mix 2 images with GPUImage or core image from such edges?

From the edges I need "connect" pictures, but want to mix them :) Is it possible? I was searching for both the filters for the correct filter, but nothing was found suitable

core image For, this CilinearGradient and CIBlendWithMask . If you look at the core image programming guide or WWDC video then there is an inclination change example which shows how to do it.

I apply the gradient only in the top step, as opposed to both in the tutorial (in this way I also see it in Photoshop; when you do it in both layers, then it Air is easy, with some unwanted transparency in the middle)

When you make your linear shield, do not just set your digit in the opposite direction, instead you want to start it on one side And finally it shore :

Set the inputpoint 0 to (1, 0) - Set the input caller to (0,1,0,1)> Inputpoint 1 (.9 * width) , 0) Set> InputColor 1 set (0,1), 0,0)

android - Making other elements scroll with the ListView -


I know that I do not have to use ScrollView as the guardian of a ListView.

However, I want to scroll the ListView with ImageView above it. Please guide me how I should do this. Thank you.

  & lt; ImageView / & gt; & Lt; ListView / & gt;   

Scroll ImageView like it is a part of the list ... Also, there is a text + image in my list view.

Why not return the image viewer as the renderer for the item zero in the list list adapter list?

asp.net - Extracting Data out of a input box inside a table cell using C# -


I have some tables that look like this:

  & lt; Table width = "650" id = "myTable" runat = "server" & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Lt; / Td> & Lt; Td> & Lt; Input type = "text" / & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt;   

Now, I want to rip that data and store it in an XML file. The problem is that the number of rows is unknown. The user can create between 3 and N rows anywhere, to solve it, I wrote a small loop that pulls data based on the line.

  // Assume that the relevant items have been declared and a fair price has been given. While (i   

This problem only after running with me now is that what is inside the input box, not just the actual input box code is in bringing, which is not really what I want .

How do I get content inside the input box?

You can develop some script by grabbing all the text values ​​of the generated text box and assigning them the same ID By and after script ID can get the value. Then store it in a variable that you can enter in your C # code

HTML for your text box and a hidden text-box containing the value of the rest of the text box using the script Can be filled in:

  & lt; Input type = "text" category = "user textbox" /> & Lt; Input type = "hidden" id = "hidden hotbox" />   

Personal preference for JQuery at this point (but I'm pretty sure that you can accomplish something like this with any script):

  $ ('Body') .live ('input', '. Usertxtbox', function () {$ ('# hiddenTxtBox'). Val ($ ('. UserTxtBox'). Val ());});   

Then, in your C # code, you can catch text with hidden text boxes.

javascript - store folder contents (images) to var -


How can I store the content of a folder that has completely images I can do it like this < / P>

  var files = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", " 7.jpg "," 8.jpg "," 9.jpg "," 10.jpg ",];   

But I want to make it more dynamic I'm planning to create 100 images in the folder. I'm thinking something like this pseudo code number_of_items_in_folder images for var images [i] = image_from_folder

images coming from a folder (Local) images called

To do this on a client only you need a trick or a hardcoded value

then

  var images = []; // You tell the script how many are and the numbers of all 0 to to 87 (var i = 0; i & lt; 87; i ++) {images.push (i + ".jpg"); }   

If you do not know how many you have, then you must preload them

  var images = [], did = wrong, I = 0; While ((done!) {Var image = new image}; Image.error = function () {done = true;} Image.onload = function () {images.push (this.src);} Image.src = I + ".jpg"; i ++;}   

And if they have different names, then you need a server script that will create an array for you. / P>

c# - Three-column GridView: one with only text, the other two with checkboxes -


I'm having trouble compelling values ​​in the checkbox and, later, to check the checkbox in gridview. Basically, I have three columns named property, tele, and nick, respectively, and I have a list of row type items. The row has three properties: name (string), tele (boole) and sur (boole). I want to populate the property with all the names (and such a display looks fine, through displaymemberbending), and the other two columns

Code> & lt; UserControl x: class = "WpfApplication2.MainWindow" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com / Winf X / 2006 / Xaml "xmlns: mc =" http://schemas.openxmlformats.org/markup-compatibility/2006 "xmlns: D =" http://schemas.microsoft.com/expression/blend/2008 "mc: Ignorable = "D" Datacentext = "{Binding Relative Soros = {Relative Aces Self}}" Margin = "0,0, -8,0"> Grid X: Name = "Live" margin = "0,0, -8.0 "& Gt; Text Box Horizontal Alignment =" Left "Height =" 23 "margin =" 114.99,12.96,0,0 "textwapping =" wrap "text =" default name "vertical alignment =" top "width = "175.01" /> & Lt; Label content = "name:" horizontal A lignment = "left" margin = "10,10,0,0" vertical alignment = "top" /> & Lt; ListView DataContext = "{binding element name = rows}" x: name = "LView" horizontal alignment = "left" height = "159" margin = "0,52,0,0" workbench = "top" width = "2 9 2 "& gt; & Lt; ListView.View & gt; & Lt; GridView & gt; & Lt; GridViewColumn x: name = "property" width = "100" header = "property" DisplayMemberBinding = "{binding name}" & gt; & Lt; / GridViewColumn & gt; & Lt; GridViewColumn x: name = "tele" width = "100" header = "In tele?" DisplayMemberBinding = "{binding off}" & gt; & Lt; GridViewColumn.CellTemplate & gt; & Lt; DataTemplate & gt; & Lt; Checkbox X: Name = "Telechoc" Ischaked = "{Binding Source = {Reslevances Teles}}" & gt; & Lt; / Checkbox & gt; & Lt; / DataTemplate & gt; & Lt; /GridViewColumn.CellTemplate> & Lt; / GridViewColumn & gt; & Lt; GridViewColumn x: name = "Surr" Width = "100" header = "In Surr?" DisplayMemberBinding = "{Binding Sur}" & gt; & Lt; GridViewColumn.CellTemplate & gt; & Lt; DataTemplate & gt; & Lt; Checkbox X: name = "telechoc" ischaked = "{binding source = {relative protection}}" gt; & Lt; / Checkbox & gt; & Lt; / DataTemplate & gt; & Lt; /GridViewColumn.CellTemplate> & Lt; / GridViewColumn & gt; & Lt; / GridView & gt; & Lt; /ListView.View> & Lt; / ListView & gt; & Lt; / Grid & gt;

XAML.CS:

  Public partial class main window: User control [Personal supervision collection & lt; Row & gt; Rows; Public Supervision Collection & lt; Row & gt; Rows {Get Rows of Return; }} Public Main Window () {Rows = New Observation Collection & lt; Line & gt; (); Rows. Add (new line ("item 1", true, false)); Rows. Add (new line ("item 2", true, true)); InitializeComponent (); }}   

}

RAW:

  Public class row: INotifyPropertyChanged {Private string Name_; Private Bull _tail; Private Bull _ Pig; Public string name {get {return _name; } Set {if (_name == value) returns; _name = value; NotifyPropertyChanged ("name"); }} Public Balls Tele {get {return _tel; } Set {if (_tel == value) returns; _tel = value; NotifyPropertyChanged ("oil"); }} Public Bull Sur {get {return_sur; } Set {if (_sur == value) returns; _sur = value; NotifyPropertyChanged ("Sur"); }} Public line (string name, boolean value, value value 2) {name = name; Oil = value; Sur = value 2; } Private Event PropertyChangedEventHandler PropertyChanged; Private Zero NotifyPropertyChanged (String Information) {if (PropertyChanged! = Null) {PropertyChanged (New, PropertyChangedEventArgs (info)); }}}   

}

made some changes to your code And it is working and it is working.

First of all, do not store your rows in the window constructor, after this window is loaded. Unfortunately I could not force the archive in the grid item list , so I did it in Codebahind after filling the collection. And rows archive personal , so you need puplic DataContext = "{Binding ElementName = rows}" was not correct collection named rows

< / P>

and secondly - / Li>

  • Instead of IsChecked = "{binding source = {relative es tele telep}} Use IsChecked = "{Binding Telephone} and Sur