Saturday, 15 January 2011

How to convert sql type double-precision in c# -


I have database access, and one of the fields is double exact, generally if I use text box 1.71 or 1, Setting in 71, the field should be 1.71 in the database.

But if I execute the query the value of acces'field is 171 !! public command string QUERY = @ "update TBLART SET TBLART.COST = @Cost WHERE TBLART.CODE = '1'"; Var param = new dynamicParameters (); Var cost = totalCost.Replace (',', '.'); // Total Tag is a textbox absolute. Add ("cost", double purse (cost), db type double); GSMMC.exe (QUERY, ultimate);

Am I wrong? Thank you.

double. Purse will use the culture of the current thread by default, I doubt uses its current culture. " As a group differential.

Two options:

  • Continue using Change as you are already doing, but then specify CultureInfo . Unchanging culture at the time of parsing
  • Remove the replacement, and use only the culture of the current thread while parsing the original value. It depends on the culture that is suitable for the user, but maybe this is a better solution when this is the case. (Otherwise, someone who is entering "1,234.56" will get a parse error if the value of "slightly more than 1234" is.)

svn - SVNSERVE - Do all repositories have to be in same parent folder? -


Here's my status:

I have inherited an SVN server (using svnserve only 2008 on Win7) with a small hard disk and a repository without a specified name. This path is C: \ svn \ repos . If possible, I will not change anything about it, and the disc is fine for that project.

Another group wants to create a new repository on this server I have added a new hard disk. Can I just go to D: Create a folder named D: \ svn \ repos \ Project2 , CD \ svn \ repos \ Project2 , and then click Use

< / P>

The text "itemprop =" text ">

It depends.

If you are running svnserve with the -r parameter, then svnserve Directory of directories specified by that parameter will only serve repositories that are immediate children.

If you do not use the -r parameter , You can place the repository anywhere, because you have to specify the full path to the repository on the server.

svnserve can be applied to view documents of various sources.

arrays - PHP Reward points to leaderboard and account for ties -


OK I'm killing my head on this for a while and trying to find me to live I am here.

I have a ranking leaderboard array like:

  [1] = array ('numerals' =>, '99', 'rank' => '1'); [2] = array ('digits' => gt; '90', 'rank' => 2;); [3] = array ('digits' => 1, '90', 'rank' => 2;); [4] = array ('points' => gt; '80', 'rank' => 4;); [5] = array ('digits' => gt;' 70 ',' rank '=> 5'); [6] = array ('digits' => gt;' 70 ',' rank '=> 5');   

Then I have a reward point system with a predefined array for awards based on the rank:

  [1] = 10; [2] 9 =; [3] 8 =; [4] = 7; [5] 6 =; [6] = 5;   

If it were not for relations then I would only match two arrays and award points because this happens based on the array key. But, since I am allowing relations, I am trying to divide the reward points tied between all the tied users. So with the references given above 2 and 3, which are re-divided, they will be divided into 9 digits and 8 ... then both will be given 8.5 points.

So the end result I see is that both the arrays must be merged:

  [1] = array ('numerals' =>' 99 ',' rank '= & Gt;' 1 ',' Reward '= & gt; '10'); [2] = array ('numerals'> '90', 'rank' => 2; 'reward' => '8.5'); [3] = array ('numerals'> '90', 'rank' => 2; 'reward' => '8.5'); [4] = array ('points' => gtk; '80', 'rank' => 4; 'reward' => '7'); [5] = array ('number' => gtc: '70', 'rank' => 5 ',' reward '=> 5.5'); [6] = array ('numerals'> '70', 'rank' => 5 ',' reward '=> 5.5');   

Leaderboard can be changed continuously by the end of the day so I am not trying to make it very complicated. I am just thinking that someone can tell me about those things which they have seen who will help me or if they had any implementation idea

which part I struggled most of my efforts I am looping through the Leaderboard array and I am constantly waiting for the 'rank', after this I should know what I should do, while I also know that I Throat instead of the corresponding test items can skip ahead array do what I had just walked into his Letrahed. Sorry, if I am confused, but I am clearly confused.

This is probably what you want:

code array (array ('points' =>' 99 ',' rank '=> 1 array (' numerals' => '90', ' 'Number' = & gt; '2'), array ('number' => gt; '90', 'rank' => 2), array ('numerals' =' gt; '80' 'Array' = & gt; '4'), array ('number' => gt; '70 ',' rank '=> 5'), array ('digits' = & gt; 70' 'Rank' => 5 ')); $ rank = array (1 => 10, 2 => 9, 3 = & gt; 8 = 4 => 7, 5 = & gt; ; 6; 6 = & gt; 5); Foreign currency ($ person $ $ => as $ prop) $ $ reward = $ rank [$ prop ['rank']]; if (isset ($ persons) [$ Person + 1])) (if ($ $ Individuals [$ person + 1] ['rank'] == $ Sahara ['rank']) {$ reward = $ reward - 0.5;}} If (isset ($ persons [$ person-1]) {if ($ Individuals [$ person-1] ['rank'] == $ Sahara ['rank']) {$ reward = $ reward - 0.5;}} $ individuals [$ person] ['reward'] = $ reward =) echo '& Lt; Pre & gt;'; print_r ($ Individuals); Echo '& lt; Pre & gt; ';

Here's what you make a reward key and fill it with the person's rank based on the index in the $ ranks array. This example is not safe. I want to check you first, if the key is also present in the $ ranks array.

This example is very "raw" and is probably not flawed with various rankings, so you have to do yourself the last test.

Output

  array ([0] = & gt; array ([number] => 99 [rank] = & gt; ; 1 [reward] = & gt; 10) [1] => Array ([number] => 90 [rank] => 2 [reward] => 8.5) [2] = & Gate; Array ([number] => [rank] => 2 [inam] => 8.5) [3] => Array ([number] => 80 [rank] => 4 [reward] = & Gt; 7) [4] = & gt; Array ([number] => 70 [rank] => 5 [reward] => 5.5) [5] => Hey ([ Number] = & gt; 70 [rank] => 5 [reward] => 5.5))    

c# - DataGridView select RowHeader or ColumnHeader -


I am trying to implement a DataGridView by clicking on the row header or selecting the whole column to enter an entire row Allows to choose Column header

I have tried to override the OnColumnHeaderMouseClick function and manually selected columns. It works only when I set the selection selection to the column header before the event is created.

How to get this behavior, any help would be greatly appreciated!

Here is my code related Detagrid view:

  public class WDSSDataGridView: Detagreed scene (override protected void OnRowHeaderMouseClick (DataGridViewCellMouseEventArgs e) {this.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect; Base.OnRowHeaderMouseClick (E);} Safe Override Zero OnColumnHeaderMouseClick (DataGridViewCellMouseEventArgs e) {this.SelectionMode = DataGridViewSelectionMode.ColumnHeaderSelect; base.OnColumnHeaderMouseClick (E);}}    

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

I think you have to do it manually:

  protected override void OnRow HeaderMouseClick (DataGridViewCellMouseEventArgs e) {this.ClearSelection (); for (int i = 0; i & lt; this.Column.Count; ++ i) {this.Rows [e.RowIndex]. Miles [i] .Selected = True;} Base.OnRowHeaderMouseClick (e);} Safe Override Zero OnColumnHeaderMouseClick (DataGridViewCellMouseEventArgs e) {this.ClearSelection (); for (int i = 0; I & lt; This.Rows.Count; ++ i) {this.Rows [i] .sec [e.ColumnIndex]. Selected = true; } Base.OnColumnHeaderMouseClick (e); }   

Make sure SelectionMode = CellSelect

How to reset google oauth 2.0 authorization? -


I am using a web application to authorize the user's Google account (for YouTube hardworking). Everything works well, but I do not know how the "logout" user, i.e. reset access token, from my application.

For example, the following code checks for user authentication and if not, the user shows the popup window for logging in to the account and the permission to use the web-app for user data :

  gapi.auth.authorize ({client_id: CLIENT_ID, radius: scope, instant: incorrect}, handheld);   

But there is no way to reset authorization in the client library.

The user has to redirect to "accounts.google.com/logout", but this approach is not like that I need it: in this way, we only need a user from a Google account Log on, but also anywhere.

Google FAQ and client library details are not helpful.

Try canceling an access token, the actual grant should be canceled so that the auto-acceptance work Stop doing I think this will solve your problem.



c# - Send/Receive http request/response from MS Word addin -


I am trying to write an add-in for MS Word. Is it possible for MS Word add-in to listen on specific ports and to receive / receive http requests / responses? Will there be a firewall between an application running MS Word and Word?

An Office AddIn is a firewall issue (without using the Windows Firewall in its default configuration) Can request, but this firewall can not talk without triggering issues.

If you are living outside the Word you are requesting to do a service inside the service that can face firewall problems while listening on the service port.

By default, Windows Firewall is included with all versions of Windows XP SP2 or later.

Additionally,

  function getrateCBR (date as dDate) as string dim sUrlRequest, intTry as integer, _ object dim oResponse strRsponse Set the object as string dim oXMLHTTP as URL set sUrlRequest = _ "http://www.cbr.ru/ script / XML_dynamic.asp? Date_req1 =" for the request of oResponse = CreateObject ("MSXML2.DOMDocument") _ & Amp; Format (DDT, "DDMMAIII") _ & amp; "& Amp; date_req2 =" & amp; Format (DDT, "DDMMAIII") _ & amp; "& VAL_NM_RQ =" & amp; Try to get the "R01235" response, 10 enters tries = 1 interval & gt; 10 set oXMLHTTP = CreateObject ("MSXML2.XMLHTTP") OXMLHTTP.Open "GET", sUrlRequest, False oXMLHTTP.send if OXILETTTP.Status = 200 then ORPSPSO.loadXML (OXMHHTP feedback text) then eliminate _expressed text if the OxxLHTML Do not set _OXMLHTTP = nothing DoEvents intTry = intTry + 1 loop no oXMLHTTP is nothing oxMLHTTP.abort :: if nothing oXMLHTTP.abort _ set oXMLHTTP = nothing is intTry & lt; = 10 then getRateCBR = Middle $ (oResponse.Text, 3) ends if not oResponse is nothing then then oResponse.abort: _ set oResponse = nothing end function   

By example

jsf 2 - Download link encodedKeyStore -


I have generated a PKCS 12 keystore via an API, but the return of process is a keystore item

How can I do this?

I am using Java and Jabs 5 AS.

/ P>

You use it to write to OutputStream can do. keyStore.store (outputstream, password);

This is basically one of the OutputStream HTTP responses. How to download a file in JSF, for a general kickoff example, In which you need to integrate this line, use head: application / x-pkcs12 for this answer.

Rails form remove has many relationship -


How much relationship can I remove through the input tag in the rail?

I have a model named invoice. I'm trying to delete all the associated models for the invoice:

   

Input Name = "Invoice [expense_ids] []" value = ""

But it does not seem to work. In the correct action for update_attributes function in the input format for the parameter What is the correct way?

How do I do this in the controller

  Invoice. Expense_Idays = [] If invoice.Serstist? Invoice .update_attributes (params [: invoice])   

that will remove any exposure association before updating the record by default, so existing ones will be added back or any If it does not pass it will be empty

  id = invoice. Expense_yends id = id.k_ip_i {i}   

| Parameters [: Invoice] [: expense_ids] .include? (I)} invoice Expans_iids = id

android - Scala's class to Java -


Please help me with this Scala class, I want it implemented on Java have:

code> class StretchVideoView (Reference: Context, attr: AttributeSet) Hui VideoView (reference, attrib) measuring {def (measureSpec: Int): Int = {val specMode = View.MeasureSpec.getMode (measureSpec) View.MeasureSpec.getSize (measureSpec)} override def onMeasure (widthMeasureSpec: Int, heightMeasureSpec : Int) {val (w, h) = (item (WidthMeasureSpec), item (HeightMeasureSpec)) GetHolder () SetFixedSize (w, h) super.onMeasure (widthMeasureSpec, heightMeasureSpec.)}}

I also do it myself Try here is my Java code to:

  class StretchVideoView extends VideoView {public StretchVideoView (reference context, AttributeSet attrs) {super (context, attrs); } Public int measurement (int measureSpec) {int specMode = View.MeasureSpec.getMode (measureSpec) ??? View.MeasureSpec.getSize (measureSpec); // maybe + here ??? Return sample; // ??? } // And I'm not sure about this: Override measurement on public zero (integer width measurement aspect, integer height measurement SPS) {int w = measurement (measurement SPS); Int H = Measurement (heightmeasureSpec); . GetHolder () setFixedSize (h, w); Super.onMeasure (width measurement aspect, height measurement aspect); }}   

Any suggestions on how to implement it on Java?

Here is the original article with this code:

I think you measurement :

  public int size (int MeasureSpec) {int specMode = View.MeasureSpec.getMode (measureSpec) see returns. MouseSpeczet Size (measurement SPS); }    

java - Exception Signal 11 using JNI CallBooleanMethod -


I am going to signal 11 in this line:

  // call is bull Internet connection () Jboolean jReturnValue = env- & gt; Callbolley System (mClass, Middle);   

In this part of the code:

  / ** * Check that the internet connection is online / / bool interface JNI :: is Internet connect () {JavaVM * Jvm = JniHelper :: getJavaVM (); Integer position; JNIEnv * env; JmethodID Middle; Bull has been attached = false; Bool returnValue = false; CCLog ("InterfaceNINInternet Connected"); // Get Status Status = jvm- & gt; GetEnv ((Zero **) & amp; env, JNI_VERSION_1_6); If (status & lt; 0) {ccolog ("the Internet connected state & lt; 0 JNI failed to get the environment !!!"); Status = jvm-> Attackercantrade (& amp; NV; Faucet); CCLog ("Internet connected status position 2:% d", position); If (status & lt; 0) {CCLog ("Internet connect connected status <"; !!!); return false; } IsAttached = true; CCLog ("Internet connected status is attached:% D", attached); } CCLog ("Internet connected status:% d", position); CCLog ("Internet connected search class ...."); Jclass mClass = env- & gt; FindClass ("org / example / social network / CCSocialNetwork"); // Static Bull HoOInternet Connection (CCLog) ("Interant Connect Connect Method ...."); Mid = avi-> Guitmethid (mClass, "Internet connection", "() Z"); If (middle == 0) {ccolog ("the Internet connected failed status static state"); return false; } CCLog ("Internet connection is connecting method ...."); // CallBull is Internet connection (jboolean jReturnValue = env- & gt; Callbolley System (mClass, Middle); CCLog ("Called"); // Convert to value from Java to C + return value = (bool) jReturnValue; CCLog ("Internet connected"); If (Attached) jvm- & gt; DetectorThread (); // Change the return value for refund; }   

But I do not know why if I make a zero call with "() V", then works fine, but when I try to call the function which is a Bool returns the number.

What's going on?

Is this a stable way or not? Your comments in the code indicate that your method is steady when calling.

If this not is stable, then you have to call CallBooleanMethod with no object and now you do not have a class like you else, otherwise you will see the CallStaticBooleanMethod should be used with the class.

  Some objects about the job =   

OR

  jboolean jReturnValue = env-> callstalkBoline method (mClass, middle);   

In either way you have to decide whether to use the static method or not.

REST console guide -


I'm using the comfort console; And I do not know how to fill the RAW group of "request payload"?

This is part of the "developer tool" - "form data" received by network-header:

  Criteria: {"boardMember": {"Price": "Include" True "," isUsed ": true," workHistory ": {" value ":" CurrentAndPast "," isUsed ": true}," includePartialProfiles ": {" value ": true," isUsed ": true}," lastUpdated "{" Value ": 0," isUsed ": true}," PERSONNAME ": {" value ":" Tayson "," isUsed ": true}}   

pay attention to me Should "request header" and "feedback title" match. Any help?

Can you please open a ticket at

c# - Self-Deleting Viewmodel in detail view - Bad Practise? -


I have a master-extension application that has the ability to order removal in the expanded view / format.

How can I inform the master-collection in the master-view model that the expansion-vododal has been removed and it has been removed from the collection?

Is it a bad design and master-view modell to remove the extension? Or is the only option to do this through an event? MVVM analog

Here's a little code

ViewModel

  public class AllMetalTransactionViewModel: WorkspaceViewModel {private ObservableCollection & LT; MetalTransactionViewModel & gt; _metalTransactions; Public supervision qualification & lt; MetLtransaction Videodel & gt; Metal implants ({return _ Metal Transaction;} set {if (set ( "metal transactions", ref _ metal transaction value)) {}}} private Metltronssevijivmodl selected metal Tronssekshn; receive public Metltrensakshnuvymodl Cynitmetltronssns {selected {elected the metal transaction;} set {if (set ( "SelectedMetalTransaction", Ref _selectedMetalTransaction, value)) {}}}} public class MetalTransactionViewModel: WorkspaceViewModel {private RelayCommand _deleteCommand; public relay comma In Command Nd Delete Delete Command {return _ ?? (_deleteCommand = new RelayCommand (() = & gt; {(IsNewUnit) {_dataService.DeleteMetalTransaction (_metalTransaction, CallbackDelete) if ;! _dataService.CommitAllChanges (representatives (bool b, object o ) {}); // How can I notify AllMetalTransactionViewModel I have been deleted? Events?}}, () =>; IsNewUnit)}}}   

XAML Master

  & lt; View: MetalTransactionView Grid.Column = "1" DataContext = "{Binding selected MetLtrontation}" & gt; & Lt; / See: MetLransactionViews & gt;   

XAML-details

  & lt; Button DockPanel.Dock = "right" HorizontalAlignment = "right" padding = "5" content = "Laisshain" Margin = "5" width = "80" Command = "{Binding Path = Htanakom}" / & gt;    

Good day to you!

You can do so many ways (I like A and D solutions):

A. Extension view model has a link to master extension view model (a method some light interface with zero, RemoveDetail (MetalTransactionViewModel details) ) or see a collection of details for example model For there links):

View details Model:

  Public category MetalTransactionViewModel: WorkspaceViewModel {Private RelayCommand _deleteCommand; IList & LT; MetalTransactionViewModel & gt; Receive pants } Public Relay Command Demand Command {get {delete_deleteCommand ??} (_deleteCommand = New RelayCommand (() => {if (IsNewUnit) {_dataService.DeleteMetalTransaction (_metalTransaction, CallbackDelete); _dataService.CommitAllChanges (Rep (bool b, object o) {});; (ParentCollection == Faucet ) {Return;} If (PainterCollection.Composition (this)) {PaintClockclause.Exclude (this);}}}, () => ISNEINET);) }}}   

From the main view model, creating expansion model:

  private MetalTransactionViewModel CreateDetailViewModel () {new MetalTransactionViewModel return () {ParentCollection = MetalTransactions}; }   

b. As you use an event you say (but be careful , because it can bring a memory for you leakage ). Please, review

c. If you are using the MVVM Toolkit, you can use the master visual model class of Remove Action to notify you of such a.

D. Remove the command in the main visual model I think this is the best solution in this case. I believe the Main Visual Model Collection Collection Details View Model .

I hope this will help you!

java - Is there any way to debug a JSP Custom tag in Eclipse? -


I'm experimenting with JSP, JSTL and

Is there any custom debugging? ">

Yes, this is the regular Java code, set your breakpoint in the Java source of the tag, start your talkbook in debug mode, open your JSP and you are inside.

c++ - Index exception in 2D -


I have a problem with the following. I have a square and a square of the entire matrix for a line of matrix applied matrix. I have created rows to reach out to members like that matrix [A] [b] But the problem is with throwing exceptions, which should be in the format "Illegal index [E] [F]". I use the try-hold in the matrix overload [] and can throw the integer exceptions from the overload [] to the lines, but if the first case is correct, the second case will not solve and the other is wrong.

  // matrix overload line & amp; Operator [] (unsigned inx) {return * rows [inx]; } // line overload double & amp; Operator [] (unsigned inx) {return item [inx]; }    

should be in the exception format such as "invalid index [e] [ F] "

It seems very difficult to compare it!

If [f] is invalid, the matrix :: operator [] (e) has already ended that parameter is now available is not.

So you have to pass this information in a line question at some point. here is a tip.

  // (member variable "int roe :: index" has been added ...) // matrix overload line & amp; Operator [] (unsigned inx) {rows [inks] - & gt; Setro Index (Inx); Return * rows [inx]; } // line overload double & amp; Operator [] (unsigned inx) {// You can now throw information about both inks and stored row index return items [inx]; }   

If [E] is invalid, line :: operator [] (f) is not asked Till now. This is an unknown value.

This means that whenever [E] is invalid, then it should return something that can operator [] Still called before throwing.

  // (member variable "bool row :: isInvalid" has been added ...) // Matrix overload line & amp; Operator [] (unsigned inx) {row * result; If (inx is invalid) {// do not throw it yet! Stable rome dummy; Dummy.setInvalid (); Result = and dummy; } And {result = rows [inx]; } Results-> Setro index (inx); Return * results; } // line overload double & amp; Operator [] (unsigned inx) {// if-> If there is untrue truth, then the first index was bad. // If the inx is invalid, then the second index was bad. // Anyhow, we now have both indexes and can throw! Return items [inx]; }    

Java Error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException" -


This is the simple code from my book that creates error messages in Netbeans and commands the compilation version (.class) version Prompt

error message

  Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: intocm.intocm.main (Intocm.java.1) at 0  < / Pre> 

Simple programs for inches to centimeters.

  Package intake; Public class intake {public static zero main (string [] AGR) // // TODO code application logic here double inch; Inch = double.valouf (args [0]). Double value (); Double cms; Cm = inch * 2.54; System.out.println (cm + "centimeter"); }}   

Error generating line

  inch = double.valouf (args [0]). Double value ();   

I do not know why this array "Args" creates this error, please help me understand it.

Thank you.

You are not running a command line argument. args [0] is expecting a command line argument.

If you are running it from the command line, try this:

  java intocm 12.0   

in eclipses

  play ---> Run configuration --- & gt; Logic tab --- & gt; Program Logic - & gt; Applicable --- & gt; Run    

java - Is it necessary to make this variable volatile? -


I was going through a "JAX London 2011" time period between 43:20 - 43:40, the audience One person says that the shutdown variable in the code below should have been declared as the volatile and the presenter agrees (and says that it is As previously mentioned, they do not modify the presentation). The code in question is:

  Queue Reader Task executes the public abstract class Runnabel {Private Boolean lock = false; Protected block queue & lt; WorkUnit & lt; String & gt; & Gt; Lbq; Public run zero () (while (closed!) {Try {WorkUnit & lt; string> gt; Wu = lbq.poll (10, tymunit milliseconds); If (wu! = Null) {doAction (wu.getWork () );}} Grip (Interrupted Exception E) {shutdown = true;}}} Public Task Zero Work (String msg); Public Zero Set Quyu (Interrupt QUUT & Lt; WorkUnitText; String & gt; & gt; Q) {LBC = q;}}   

My question: I do not think that shutdown should be declared unstable . My argument is that being a member of shutdown a runner, , every work / thread will be a unique personal copy of that variable, then it will be variable Why do you make it?

But since this was discussed in Jade 2011, I am convinced that many of the viewers of that audience were Java developers, I do not think that all of them would remember this ! So, what am I missing?

PS: - I can understand that a variable Should be declared unstable , if it was shared by multilevel thread, such as double-check-locking pattern:

  class Foo {personal volatile helper assistant = Zero; Public Helper getHelper (if {Helpful == blank} {synchronize (this) {if (assistant == zero) helper = new helper (); }} Return Assistant; }}    

Each task / thread will be a specific private copy of that variable . So, why do they make 'unstable'?

If is off boolean has been modified from within only QueueReaderTask example In that case, shutdown is being modified by only one thread and there is no need to be instability .

Frankly, the code looks strange to me. Why take the interrupted steps , shut down set the boolean, and loop around it and why do you do the following now? Why the shutdown flag is at all?

  while (true) {try {workUnit & lt; String & gt; Wu = lbq.poll (10, tymunit milliseconds); If (wu! = Null) {doAction (wu.getWork ()); }} Grip (Interrupted E) E. {Thread. WrenchTrad () Interrupt (); Return; }}   

Perhaps there is additional code that was deleted in the post? If not, I wonder if it was pasted from a large part of a copy code, where a method was set to call shutdown correct too.

PS: - I can understand that a variable should be declared 'volatile' if it was shared by multilevel thread, such as in double-check-locking pattern:

right. A typical format is that shutdown has been modified from another thread which is asking the formula to stop processing. In that case it should be unstable .

php not getting data from Request, posting from curl -


I'm firing a curl request from the command line.

My curl request looks like this:

  Curl -X Post-H "Accept: Application / Jason" -H "Content Type: Application / Jason" -D '{"BookingByCustomer": "testUser", "BookingDate": "11111111", "Total Cost": "11", "NetAmount": "11"}' http: // serverIP: port / test.php   

My PHP code:

  & lt ;? Php / ** global variable * / $ request_called = ($ _SERVER ['REQUEST_METHOD'] == 'GET')? 'GET': 'Post'; If ($ request_called == 'POST') {handle_post_request (); } If ($ request_called == 'GET') {handle_get_request (); } Function handle_get_request () {resonant "Receive Request Received!"; } Function handle_post_request () {$ json = $ _SERVER ['HTTP_JSON']; Print_r ($ _SERVER); }? & Gt;   

but Jason Data does not seem to be in $ _SERVER $ _ SERVER ['HTTP_JSON']

< P>

] in $ _ server . You need to get the contents of the post from $ _ POST .

But as you are not giving your JSON data, a variable name will give you raw POST content pre> $ json = file_get_contents ("php: // input");

Another solution would be to give your JSON data a variable name:

  curl -x post ... -d 'HTTP_JSON = {... } ''   

Unless you have any taboo characters (like? Or Android) in your Jason, otherwise you need to encode your JSON string to the URL. This is the reason why I suggested the first solution using the php: // input . In this way you do not have to pay attention to URL encoding.

functional programming - Can branch and bound algorithms be implemented purely functionally? -


शाखा और बाउंड का सामान्य विवरण

विकिपीडिया से:

इस कदम को छंटाई कहा जाता है, और आम तौर पर एक वैश्विक वैरिएबल m (पेड़ के सभी नोड्स के बीच साझा) को बनाए रखने के द्वारा कार्यान्वित किया जाता है जो कि अब तक जांच किए गए सभी उप-क्षेत्रों में देखा गया न्यूनतम ऊपरी बॉर्डर रिकॉर्ड करता है।

व्यावहारिक उदाहरण: यात्रा विक्रेता समस्या

यात्रा के लिए एक सरल समाधान विक्रेता की समस्या एक चर रखने के लिए है, जैसे सर्वोत्तम , जो अब तक सबसे कम हैमिल्टनियन सर्किट का प्रतिनिधित्व करता है (ऊपरी बाध्य)।

हर बार जब हम एक संभावित नए सर्किट में एक नए कदम पर विचार करते हैं, तो हम पथ की लागत की गणना करते हैं वर्तमान बिंदु पर, उदा लागत , जो कि इस रास्ते की लागत पर कम है, और इसकी तुलना श्रेष्ठ चर के साथ करें अगर किसी भी बिंदु पर लागत & gt; = सर्वोत्तम , हमें इस पथ पर विचार करने की आवश्यकता नहीं है; हम सभी संभावित मार्गों को छिड़क सकते हैं जो इस उपपथ से शुरू होते हैं।

यह एक प्रक्रियात्मक भाषा जैसे कि सी में कार्यान्वयन करना मुश्किल नहीं है, जहां हम एक चर बना सकते हैं जो फ़ंक्शन के दायरे में है। उदाहरण के लिए,

  int सर्वोत्तम = -1; / / सबसे अच्छा पथ अभी तक नोड * हल टीएसपी () {// सबसे अच्छा समाधान किया जा सकता है और समाधान करने के लिए सभी रिकर्सिव कॉल में एक सुसंगत // मान होता है ...}   

मेरा वास्तविक प्रश्न

यह मेरे लिए स्पष्ट नहीं है कि इस तरह के एक एल्गोरिथम को कैसे लागू किया जाएगा विशुद्ध रूप से कार्यात्मक क्या विकिपीडिया की परिभाषा में वर्णित वैश्विक वैरिएबल m का अनुकरण करने का कोई तरीका है?

मुझे पता है कि लिस्प में एक वैश्विक चर होना सरल है, लेकिन यह संभव है कि किसी और में शुद्ध रूप से कार्यात्मक भाषा जैसे कि हास्केल?

आप केवल रिकर्सिव के लिए एक अतिरिक्त तर्क के रूप में मौजूदा सर्वोत्तम मूल्य कॉल और अपने परिणामों के एक हिस्से के रूप में अपडेट किए गए सर्वोत्तम मूल्य भी वापस लौटाते हैं। इसलिए यदि आपके पास a - & gt; प्रकार का एक फ़ंक्शन है बी , ऐसा कुछ हो जाता है जैसे a - & gt; इंट - & gt; (बी, इन्ट) । वैश्विक चर को पढ़ने के बजाय, आप अतिरिक्त तर्क पढ़ते हैं, और इसे लिखने के बजाय, फ़ंक्शन खत्म होने पर आप संशोधित मान वापस करते हैं।

यह अच्छी तरह से इस्तेमाल किया जा सकता है। प्रकार Int - & gt; (बी, इन्ट) isoMorphic है स्टेट इंट बी , इसलिए हमारे प्रकार का कार्य a -> बी हो जाता है a - & gt; स्टेट इंट बी

How to use modulus with PHP to add a CSS class to a grid of images depending on two different patterns? -


I want to use the modulus to apply the CSS class to the grid of images in two different conditions: / P>

status1
I want to apply the CSS class to all the medium images indicated by *. I just can not use nth-child because I do not know that there will always be 9 images in the grid. Sometimes it can be 5, sometimes 7, sometimes 8, etc. ... this variable [IMG 1] [IMG 2] [IMG 3] [IMG 4] [IMG 5 *] IMG 6] [IMG 7] [IMG 8 *] [IMG 9]

status2
I would like to re-apply a CSS class * I used nth-child for similar reasons for the images in the grid indicated by I can not add css properties through the media situation in the given class in this position as the site has a lower width, so two columns of images. [Image 1] [Img 2 *] [Image 3] [IMG 4 *]

I have done the code yet

 < Code> if ($ counter% 3 == 1) {$ Situation1 = TRUE; } If ($ counter% 3 == 0) {$ condition2 = TRUE; } $ Counter ++; & Lt; Div & lt ;? Php if ($ position 1) {post_class ('condition1'); } If ($ position2) {post_class ('condition2'); } & Gt; & Lt; Img src = "" / & gt; & Lt; / Div & gt;    

The modulus is the remainder of the first operand divided by another, so your case will be required :

  if ($ counter% 3 === 2) {$ condition1 = TRUE; } If ($ counter% 2 === 0) {$ situation2 = TRUE; }   

and you can rewrite it:

  $ condition1 = ($ counter% 3 === 2); $ Position2 = ($ counter = 2 === 0);   

However , you can do this in CSS using the nth-child selector (IE9 +):

Status 1:

 : nth-child (3n + 2)   

Status 2:

 : Nth-child (2n + 2)    

c++ - Why is my data member empty even after construction? -


I have included the definition of both the question class and its implementation, the first is a header file and another CPP file.

I gave the comments to show that where the problem is, I can provide a question under the constraint for some reason. Only text is fine, but when I try to do it under the getQuestionText function it just produces an empty string? Any help would be most appreciated!! Thanks!

  #include & lt; String & gt; # Include & lt; Vector & gt; # Include & lt; Iostream & gt; using namespace std; #ifndef QUESTION_H # Question Define QUESTION_H class question {public: question (int thePointValue, int, theChapterNumber, \ string theQuestionText); Int getPointValue () console; Int getChapterNumber () CONST; String getQuestionText () console; Virtual Zero Writing Question (Orstream and Outfile); Virtual Word Written (Ostream and Outfile); Private: int pointValue; Int chapter number; String question text; Write zero PointValue (ostream and outfile) const; }; #endif #include "Question.h" Question :: Question (int thePointValue, int theChapterNumber, \ string theQuestionText) {pointValue = thePointValue; ChapterNumber = theChapterNumber; QuestionText = theQuestionText; // This work is perfect right here & lt; & Lt; Question & lt; & Lt; Endl; } Int Question :: getPointValue () const {Return Point Value}; } Int Question :: getChapterNumber () const {return chapterNumber; } String Question :: getQuestionText () const {// This problem is there is no lack of ITM here. Cout & lt; & Lt; Question & lt; & Lt; Endl; Return question text; } Zero Question: Written Question (Ostream and Outfile) const {writePointValue (outfile); Outfile & lt; & Lt; Question & lt; & Lt; Endl; } Zero Question: writeKey (ostream and outfile) const {writePointValue (outfile); Outfile & lt; & Lt; Endl; } Zero Question: writePointValue (ostream and outfile) const {string pt_noun; If (pointValue == 1) pt_noun = "point"; Other pt_noun = "points"; Outfile & lt; & Lt; "(" & Lt; point value <";" "& lt; pt_noun <; lt;") "; } Vector & lt; Question * & gt; Question list (string filename, int min, max max) {vector & lt; Question * & gt; QuestionList; String line; Of vector & lt; String & gt; Text; Ifstream in_file; In_file.open (filename.c_str ()); While (gateline (in_file, line)) {text.push_back (line); } String type; For (int i = 0; i & lt; text.size (); i ++) {int num = text [i] .find ('@'); Type = text [i] .substr (0, number); If (type == "multiple") {multiple questions myq = matchup (text [i]); Multiple Choice Questions * myptr = & amp; Myq; If (myq.getChapterNumber ()> gt; = min & myq.getChapterNumber () & lt; = Max) {questionList.push_back (myptr); }} If (type == "small") {shorteners questation myq = SAMatchup (text [i]); Short answer questions * myptr = & amp; Myq; If (myq.getChapterNumber ()> gt; = min & myq.getChapterNumber () & lt; = Max) {questionList.push_back (myptr); }} If (type == "long") {long and lower question myq = LAmatchup (text [i]); Long Ancer Question * myptr = & amp; Myq; If (myq.getChapterNumber ()> gt; = min & myq.getChapterNumber () & lt; = Max) {questionList.push_back (myptr); }} If (type == "code") {code question myq = CODEmatchup (text [i]); CodeQuestion * myptr = & amp; Myq; If (myq.getChapterNumber ()> gt; = min & myq.getChapterNumber () & lt; = Max) {questionList.push_back (myptr); }} Cout & lt; & Lt; Question List [Question: Song (1) - 1] - & gt; Go Q & A text () & lt; & Lt; Endl; } (Int i = 0; i & lt; question list. (); I ++) {int numm = QuestionList.size (); Cout & lt; & Lt; Question List [numm-1] - & gt; GetQuestionText () & lt; & Lt; Endl; } Return question list;   

}

Then when I call it in main code break

  vector & lt; Question * & gt; List = questionsList (pool_filname, minimum_actor, max_computer); Cout & lt; & Lt; List [0] - & gt; GetQuestionText () & lt; & Lt; Endl;    

You are announcing your code several times, the local objects and their pointer to the function At the end of the block, there will be question list vector (returned by the function) in it.

  MultipleChoiceQuestion myq = matchup (text [i]); // & lt; Local Objects Multiple Chisel Questions * myptr = & amp; Myq; // & lt; Pointer Query List for Local Objects Push_back (myptr); // & lt;   

At this point you can either use (I do not suggest you do this unless you are completely compelled, and even in that case Standard library) or store objects directly inside the vector.

php - Why do references use more memory? -


Should not those scripts use less memory?

A function (& amp; $ Var); Uses more memory than the function ($ var); More as

and foreach ($ arr = $ k => & amp; $ V) foreach ($ k => $ v) Uses

for example $ var 24 uses MB. If I pass it by reference then it uses 27 MB

(unfortunately) < With the expansion inside the empress zend engine, I am referring to:

In PHP the reference is a means of accessing the same variable content with different names. They are not like Sea Points; For example, you can not make pointers arithmetic using them, they are not actual memory addresses, and so on. See what the references are for more information. Instead, they are the symbol table nicknames Note that in PHP, the variable name and variable content are different, so the same content can have different names. The closest similarity is with the Unix filenames and files - variable names are directory entries, while the variable content is the file, references can be linked to hardlinking in the Unix filesystem.

I think comparing with a Unix file system is easy to understand. If you have many names for the file, then you will need additional storage to store those names.

python - Remove unnecessary repeated tags with BeautifulSoup -


I am using Python and beautiful soup to extract some text from html. I have some html in which the text of the form is

  & lt; H3 & gt; & Lt; B & gt; ABC & lt; / B & gt; & Lt; B & gt; DEF & lt; / B & gt; & Lt; / H3 & gt;   

I want to remove the repeated b tag. Is there a quick way to do this?

It works just fine for BS4

  [4]: soup.h3 out [4]: ​​& lt; H3 & gt; & Lt; B & gt; ABC & lt; / B & gt; & Lt; B & gt; DEF & lt; / B & gt; & Lt; / H3 & gt; In [5]: soup.h3.text out [5]: U 'ABC DEF'   

See document and package here:

java - Is it not safe to insert into a list while iterating through it? -


Is it true that it is not safe to rotate during the list? idea? I'm not sure that personally ...

As I was hoping that concurrent modification Exceptional throwing I test it on a simple example:

  test for the public class {public static zero main (string [] args) {list & lt; Integer & gt; List = New Arrestist & lt; Integer & gt; (); List.add (1); List.add (2); List.add (3); (Iterator> Lieutenant> Integer> gt = list.iterator (); it.hasNext (); it.next ()) {System.out.println (it.toString ()); List.add (4); }}}   

Change the array list for the linked list, give the same result if I remember that the only job removals are actually correct

facebook - Error 500 on dialog/oauth API after today's push at 8:21 -


Our applications are receiving error 500 on this call:

There is a job, just replace "www.facebook.com" with "m.facebook.com"

Facebook has left support for the old API key. If you see your App Settings page, you will see the App ID / API key They were merged back in 2011, so replace their APIs with the API for the customer API

It should have been a subversive change.

Is there a way to tell if website is built with perl from source or anything -


I'm just thinking, there's a way through which I can find out that the website is using Perl as That's what I have said that he can tell with Wordpress or php created with uses.

You can not ask a web site that has been implemented in the language. There is no rule that says ".php" URLs must run PHP (although this is probably the case), all of which has been fixed on the server side. There is no guarantee that a site that is "powered by Wordpress" is actually using Wordpress. Generally, it is a bad protection to provide information about your implementation details, because an attacker uses it to launch a known attack. Can choose to choose.

However, there are several ways to guess.

Does it end in ".pl" to see the URL in an easy way to tell one? Its probably Pearl (or you're looking at a Polish domain)

If you look at the feedback header, sometimes the web server will obviously recognize the use of the Perl. For example, to request the server you curl-i < / Code> and you can see the "server" and "x-power-by" headers.

  $ curl-I http://perldancer.org HTTP / 1.1 200 Date: Wed, 27 Mar 2013 05:04:14 GMT Content-Type: Text / html; Perl Dancer 1.311 Content-Length: 1984 by X-Power: Pearl Dancer 1.311   

Although still using Perl, "server" and "x-power-bye" "Fields are completely informative and used to collect statistics. Actually this is bragging. The server is not required to say reality. Actually,.

If the web page detects what technology it is using, for example it is run by the executable type, you can see and see what it is .

Sometimes you can get hints, sometimes with small details in HTML and other content, they clearly tell in comments that what is used to produce HTML sometimes You can definitely guess based on the field. Sometimes you can tell by the cookie names and values. Sometimes you can tell how it creates JSON, XML, YAML or RSS output. Sometimes the software that creates itself identifies the image and the PDF header.

There are devices that will guess the operating system based on very small details of the implementation of its networking protocol, but I do not know

and, as Colin has suggested , You can try to take out an error message from the server.

But you can never really know it is the beauty of the web as a universal communication protocol, it does not matter what it's written in it.

How to use .map file to find the space allocations of different files in embedded C -


If there is a compile with the GCC compiler, there is a way to find different locations and allocated places to files.

You can easily use the map file to find the allocation of static varibles.

If you want to sort through the announcement file, this information must be written to the program that does this, which should be possible. The same goes for code allocation.

android ndk - How do I get crash dump in ndk. not in debug -


How does a crash dump get when my app crashes, it's usually my APK's C + + module I found out that this code was created in C ++ by

  {some crash code for test made} hold (...) {i, hold, and info in sd card Type}   

When the accident occurs, the code does not enter the hold part, it crashed immediately.

Is there a mess? Thank you.

Your accident is due to division fault.

CIGEEGE is considered a bug in C ++ caught by SIGSEGV not caught by accident and some things should be done with code to fix this, rather than wrap it with catch.

If you are very important to seg fault, but have a look at You can try it, but there is no guarantee that it will work.

c - How to handle when a Client or Server is Down in a UDP Application -


I am developing Windows applications for client server communication using UDP, but since UDP is no connection, Whenever a client goes down the server does not know that the customer is closed and keeps sending data. The same is the case when the server is down how can I fulfill the condition that whenever a customer or server stops, the other party should know it and handle it. Waiting for reply.

Whatever you are asking is beyond the scope of the UDP. To obtain this, you have to apply your own protocol above the UDP.

A simple idea can be sent from time to time (on the other hand TCP is in this facility)

You have a simple implementation as follows:

  • Continue sending those messages to a background thread and waiting for the replies.
  • On receiving the answers, you can populate some types of data structure or file containing the list of live devices.
  • Your other main threads (or threads) may contain the following changes:

    1. Before sending any data, check that the customer you send Want to present it in that file / data structure.
    2. If not, skip this client.
    3. Repeat populated files / data structure for all remaining customers.

      Ul>

    4. i1 = Use the following analogy instead of your background thread that sends a keepalive message.
    5. i2 = Your main thread (or threads) that send / receive data and do your other work.
    6. The RAW threat first tries to read i2 data structure / file that is i1 first I1 is updated by
    7. This means (worst position), i2 update list will not be found, and it can miss some clients this way.
    8. If this loss will be significant, I can suggest that you probably have a mechanism by which i1 is indicated by i2 whenever anyone Will finish the current writing
    9. If this loss is not important, then you can leave the above mechanism to accelerate your program.

      Explanation for Keepalive Message:

      You just need to send a very light message (usually there is no data. Only header information). Make sure this message is unique . You not want to define any other message as a text message.

      You can send this message to sendto () call. After the sending ends, recv () . Use

      to wait for the answer for a certain timeout. Log in every answer in the data structure / file, after the expiration of the expiration, for some time the gold goes to sleep. When that time expires, repeat the above procedure.

      To help you write a good, strong networking code, it is absolutely amazing that it tells many concepts.

html - How to use SWF as body Background? -


How to use SWF as body background in HTML with CSS or some other scripts? body {background-image: url (bg.swf); Background repeat: repeat; Background-position: center top; }

(this is just an example)

best The way I think that will simply determine the status of SWF in my CSS code, so that it is always behind all the items that appear.

You can use the z-index property for:

  .mySWF {z-index: -1; } This creates a class call "mySWF" which is behind the rest of the rest of everything else. All you have to do is add that you can add it to your SWF object in the code:  
  class = "mySWF"   

And he will push it back.

.net - Can I host multiple different windows services in a single windows service? -


I have a cluster of legacy windows service. All of these services have been installed on multiple servers, but for few reasons the service is low May be, such as memory leak, file system exception and SQL connection exceptions, so we have to remotely reset the server and check the status of daily service. However the restore operation has been added. But it is still not strong, controllable.

The solution I want to find is to integrate all existing services into a single window service, this host service can run sub-services and schedule them and monitor them, when errors , Can restore my host service, log the error into the database, and send email to the concerned people. The solution can also do to schedule a service, such as a stop, set it from time to time, so I want to know that in a way I do not need to modify the assembly of the window service that was received from the servicebase. And integrates them into my framework. I thought that the OS can host the sub service, there is a way that my host service or frame work can also be hosted by sub service and should also schedule them.

My ultimate goal is to serve only one window, this is my host service, without installing it in the OS, the other sub service runs under my service.

I have opened some related threads below, but they can not fit my needs:

  • When do you say that services mean that the proper services or executable services? If this is the latter, then you have complete control over it. You can create subservices as threads or processes. The big problem is killing the processes. With every new release of Windows OS, they add more security features that make it difficult to kill processes.

    Threads can be a problem, if a thread dies due to memory leaks, then it is affected by the program. The entire program may have to kill and restart themselves.

    A note of warning: Services are run as a user called "local user" You can not log in as a "local user" and even top administrators (administrator's By name), you can not kill "local users" services or processes Only "local users" can kill them.

    Have you seen shareware products such as FireDemon? They do something similar

windows phone 8 - Is it possible to set naviagtion uri for BackTile click -


I have developed wp8 app,

I've updated your app tile on some scenarios ,

here I was used to update your tile code

  Shell tile Tailtofind = Shailtil. ActiveTiles.first (); StandardTileData NewTileData = new Manktaildeta {BackgroundImage = new Uri (@ "/ ApplicationTile.png", UriKind.RelativeOrAssolute), calculated = Notifikeshnkount, Baktait = offers.data.info [0] .offer_title, BackContent = offers.data.info [0 ] .location_area,}; TileToFind.Update (NewTileData);   

Here's my question, what back-navigation tiles is possible to set Yuri, as I here navigation uri your toast message

 < Code> Microsoft .phone Shell.ShellToast Toast = New Microsoft.phone Shell. Shellstoost (); Toast.Content = "@" + offers.data.info [0]. Location_area; Toast.Title = offers.data.info [0] .offer_title; Toast. NavigationRush = New Uri ("/ LocalsPM.Xml", Urikhind.RelativeViva); Toast.Show ();   

When I click back tile and front tile, I need to navigate to different pages.

Anybody please tell me, please, if possible please

thanks.

Naurul.

If it is not possible then there is no other way to do this.

Thank you.

user backup appears there is no way to a different URI set to the toggle a tile.

If you need to navigate in different parts of the app then you can use several tiles.

Alternatively, if you update are updated after the tiles are available and there is a different action when you launch the app you want to do and new information (for example Home Instead you go directly to that new item) You can check it when the app is opened. To avoid requesting [n additional] network on launching the app, you can use a background agent to regularly pull up the latest data (including a flag to identify a new item), so it would be Is when the app is launched.

oop - Refactoring and dependencies issue -


I have many SMS providers, each file system in a different directory. Within each provider directory, the main category Abstract Class Provider provides Abstract.php which is located in the file system and outside the provider directory.

I want to make each provider a separate composer package so that it can be developed, tested and independently deployed. The problem provider is the essence element that each provider extends ... What is the best way to do this situation?

In advance thanks

I do not know if this is the right way if you have an example monologue or swift mailer, they have" provider "inside a composer package. They can develop a provider, test them without deploying others and later deploy the entire package. If you decide to reduce your composer packages very little, you will end up very much over land.

However, if you want to go to it, you can extract yourself the intangible class in your composer package and all other packages are in the form of this dependency that way the PSR3 logger interface Is used.

java.net.ProtocolException: Cannot write output after reading input -


I am trying to send the object to the Straight Action class by using the Object output stream, but one exception Java.net.ProtocolException : After reading the input the output can not be written.

I created a new instance of URLConnection to give a specific URL and tried to write an object in the URL to send the Stratus action class from the applet

I click the applet button button Calling this method to save

Public Save Design () {

  try {HttpURL Connection URL Connection = getServletConnection (Call Savelt Connection., Zero); // Pragma = no-cache; Faucet (urlConnection! = Null & amp; URL Connection. Getheadfield (.). ("Prague")! = Faucet) Return false; OutputStream Outstream = urlConnection.getOutputStream (); // Exception can be here ObjectOutputStream Object Outstream = New ObjectOutputStream (Outstream); Objectoutstream.writeObject ("abc"); Objectoutstream.flush (); Objectoutstream.close (); System.out.println ("write vctObjectDetails"); } Hold (malformedURLException exception) {exception Print straps (); } Catch (connect exception exception) {Exceptions Print straps (); } Hold (IOE exception exception) {exception Print straps (); } Hold (exception e) {e.printStackTrace (); }}   

But it does not work. Please give me some tips if someone knows how to handle this exception.

This is to do with the lifecycle of an HTTP request (which is the HttpURLConnection summary) - a Once the request has been sent, you can not modify it any more - if you have more data to send, then just create another one below what is happening when you getHeaderFields () (Response Header field), then the 'HTTPR Connection' sends the request and provides feedback.

I do not know what's in GetServletConnection (), but do not forget to read and read from the response, unless you finish writing the request.

android - onClickListener for custom ListView -


I'm having trouble adding an onClickListener to my custom list adapter, code below. OnListItemClick is applied as with a regular List View, but when any item is clicked, then "appears in LogCat excluding unregistered Listnr ....."

Any help would be greatly appreciated

MyListAdapter.java

  import android.app.activity; Import android.content.Intent; Import android.view.LayoutInflater; Import android.view.View; Import android.view.View.OnClickListener; Import android.view.ViewGroup; Import android.widget.ArrayAdapter; Import android.widget.Button; Import android.widget.ImageButton; Import android.widget.ImageView; Import android.widget.TextView; Import android.widget.Toast; Public Class MyListAdapter ArrayAdapter Expanded & lt; String & gt; {Context of personal end activity; Private last string [] name; Static class viewer {public button button; Public image button image button; Public image button image button 2; } Public MyListAdapter (Activity Reference, String [] Name) {Super (Reference, R.Let.Custom_List_Stime, Name); This.context = context; This.names = names; } @ Override public view getView (integer position, seeviewview, ViewGroup parent) {see line view = convertview; If (line view == empty) {layout infletter inflater = context.getLayoutInflater (); Line view = inflater.inflate (R.layout.custom_list_item, tap); SeeHolderHolder = New Viewholder (); ViewHolder.button = (button) rowView.findViewById (R.id.txtTitle); ViewHolder.imageButton = (ImageButton) rowView.findViewById (R.id.moreInfo); ViewHolder.imageButton2 = (image button) rowView.findViewById (R.id.imgArrow); RowView.setTag (viewHolder); } Viewer holder = (seeholder) rowView.getTag (); String s = name [location]; Holder.button.setText (s); Holder.imageButton.setImageResource (R.drawable.more); Holder.imageButton2.setImageResource (R.drawable.arrow); Return line view; }}   

customer_list_item.xml

  & lt ;? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Fill_parent" Android: Layout_height = "Fill_parent" android: orientation = "horizontal" android: padding = "10 DP "& Gt; & Lt; Android: layout_highth = "fill_parent" android: layout_marginBottom = "5dp" Android: layout_marginRight = "15dp" Android: layout_marginTop = "5dp" Android: Background: ImageButton Android: id = "@ + id / moreinfo" Android: layout_width = "wrap_content" = "@ android: color / transparent" Android: contentDescription = "@ string / More_info" android: gravity = "Center_vertical" android: src = "@ drawable / more" / & gt; & Lt; Android: layout_marginBottom = "5dp" Android: layout_marginTop = "5dp" Android: layout_weight = "1" Android: Background: Android: layout_width = "fill_parent" android: layout_height = "fill_parent" Android: id = "@ + id / txtTitle" = "@ android: color / transparent" android: gravity = "Center_vertical" Android: textcolor = "# 000000" Android: textIsSelectable = "true" Android: textSize = "22sp" android: text-style = "bold" / & gt ; & Lt; Android: layout_marginBottom = "5dp" Android: layout_marginRight = "15dp" Android: layout_marginTop = "5dp" Android: background: ImageButton Android: id = "@ + id / imgArrow" Android: layout_width = "wrap_content" Android: layout_height = "fill_parent" = "@ android: color / transparent" Android: contentDescription = "@ string / Select_trick" android: gravity = "Center_vertical" android: src = "@ drawable / arrow" / & gt; & Lt; / LinearLayout & gt;    

arrow button, type the new class Clicker

  applies the public class clicker View.OnClickListener {int position = 0; / * ------- Constructor to store the condition that the click event was triggered ---------- * / Public clicker {status = pos; // This will be the status of the selected items in the list. } Public Zero onClick (see v) {// your operation}}   

this Clicker call in getView method,

  holder.imageButton2.setOnClickListener ( New clicker (status));   

Use the same process for more info buttons

xcode - Adding ObjectiveFlickr to Project -


I am trying to add the ObjectiveFlickr framework in my project.

I tried to follow these instructions:

  Exactive flaker in your Mac project. Add Akskodru (Akskod menu Add Project & gt; Project ...) on your app targets more info window target), then add Also, in the General tab, ObjectiveFlickr (library) direct dependence, the same window linked Libraries drag libObjecitveFlickr.a for the library group with the goal of linked binary add CFNetwork.framework    
  lost information window of your target again Set up configuration for all configurations, then find the header search path property, to add these two paths separately (lt and; root & gt; where ObjectiveFlickr checkout), add & lt; Of root & gt; & Lt; Of root & gt; / LFWebAPIKit use #'d import in its project "ObjectiveFlickr.h" to   

But it seems that was written for older versions of XCode these instructions (I use 4.6 ). I tried to translate these instructions "to the new version of XCode" but no matter what I do, lives in libObjectiveFlickr.a red and I get the following errors:

  Symbols for undefined architecture ARMv7: "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: - [LFSiteReachability stopChecking] libObjectiveFlickr.a (LFSiteReachability.o) "_SCNetworkReachabilitySetCallback" referenced from: - [LFSiteReachability startChecking] libObjectiveFlickr.a (LFSiteReachability.o) " _SCNetworkReachabilityCreateWithAddress ", referenced from: - [LFSiteReachability NetworkCan [LFSiteReachability.o] in libObjectiveFlickr.a - [LFSiteReachability initial probe] libObjectiveFlickr.a (LFSiteReachability.o) "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: - [LFSiteReachability startChecking] libObjectiveFlickr.a (LFSiteReachability.o) "_SCNetworkReachabilityGetFlags" , refer to: - [LFSiteReachability network connectivity Axis] libObjectiveFlic in kr.a (LFSiteReachability.o) - [LFSiteReachability startChecking] in libObjectiveFlickr.a (LFSiteReachability.o) ld: symbol (s) found for architecture ARMv7 Clank: error : Exit the linker order with code 1 (use -v fail) Invocation to Kne)    

You'll need to link your goal against the SystemConfiguration.framework . You can do this by the way you CFNetwork.framework .

Can the chosen jQuery combobox have different widths based on whether it's open? -


I am selected to make fun Cambodia. Everything works fine, but I have a question.

I think the alternate list takes the width given in the visual cobobox. All my options are very long and I need to make a big blanket to avoid the two lines going.

Is it possible to make a small combobox, such as 150px, when it stops, and when a huge list is open?

Yes, this is possible. This can be done in 2 ways:

  1. Style "width" in selected.css in class chzn-drop Adding
  2. Adding width through jQuery.

    I like the second and here's the code:

    HTML:

        

    jQuery: $ ('.chzn-select'). Chosen (); $ ('. Chzn-drop'). CSS ({"width": "300px"});

    Result:

    > </ P> <p> Hope you have understood. </ P> </ div> </ html><br /><br /> 
<div style='clear: both;'></div>
</div>
<div class='post-footer'>
<div class='post-footer-line post-footer-line-1'><span class='post-author vcard'>
Posted by
<span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'>
<meta content='https://www.blogger.com/profile/05006124498600715544' itemprop='url'/>
<a class='g-profile' href='https://www.blogger.com/profile/05006124498600715544' rel='author' title='author profile'>
<span itemprop='name'>Unknown</span>
</a>
</span>
</span>
<span class='post-timestamp'>
at
<meta content='http://giuseppina-lsgtudhar.blogspot.com/2011/01/can-chosen-jquery-combobox-have.html' itemprop='url'/>
<a class='timestamp-link' href='https://giuseppina-lsgtudhar.blogspot.com/2011/01/can-chosen-jquery-combobox-have.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2011-01-15T02:22:00-08:00'>02:22</abbr></a>
</span>
<span class='post-comment-link'>
<a class='comment-link' href='https://giuseppina-lsgtudhar.blogspot.com/2011/01/can-chosen-jquery-combobox-have.html#comment-form' onclick=''>
No comments:
  </a>
</span>
<span class='post-icons'>
<span class='item-control blog-admin pid-1004033436'>
<a href='https://www.blogger.com/post-edit.g?blogID=647212097946239830&postID=242955742789685828&from=pencil' title='Edit Post'>
<img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/>
</a>
</span>
</span>
<div class='post-share-buttons goog-inline-block'>
<a class='goog-inline-block share-button sb-email' href='https://www.blogger.com/share-post.g?blogID=647212097946239830&postID=242955742789685828&target=email' target='_blank' title='Email This'><span class='share-button-link-text'>Email This</span></a><a class='goog-inline-block share-button sb-blog' href='https://www.blogger.com/share-post.g?blogID=647212097946239830&postID=242955742789685828&target=blog' onclick='window.open(this.href,

google mirror api - Can you allow a user to REPLY to a card and not have a card appear with their response text in the timeline? -


I have a bundle (maybe even with a timeline card) Take action with the answer and the user With the text "Peanut Butter and Jelly Sandwich", a new timeline card appears on a black background on the glass when it says "Peanut Butter and Jelly Sandwich". When watching the playground, a card appears similar to the user's avatar on the left (like Abe Lincoln template example), and the text on the right.

We call this new card a reminder card, because it reminds the user that the text they wrote and permission to send.

I did not include that reminder card in the timeline.

Is there a custom glass behavior to answer this lesson that the user has given a text? Does it count against our API Milan, or is it a freebie and some have accused Google about the account?

There is no way to answer and implement any kind of document to prevent the demonstration of this reminder. Card?

Here is the document that seems to encourage nonverting repetitive actions, which can be inspired by this reminder card behavior.

Answer, REPLY_ALL - Voice Answers Do not use voice answers to capture a limited set of options that are targeted to catch voice-free form input, such as possible in games Trick.

(New MenuEmploy (.) SetAction ("REPLY"));

"Answer" timeline items are automatically inserted by the glass client and its Have ownership set to your Glassware: This means that you have to read / write full on this timeline item.

It is up to your glassware to apply the process of timeline items and some styles. Timeline items are also useful for the user because it answers the user to "delete" if necessary. If the answer does not make sense in your glassware, then remove the timeline items while processing to remove the user from the timeline.

Regarding API quota, when you send the actual request, retrieving the timeline item for the API, the glass producing "REPLY" does not use your quota.

ruby - relation has_many rails with inheritance -


I have:

  class character & lt; ActiveRecord :: Base is: Medium: Item, By: character_items has_many: character_item end class item & lt; ActiveRecord :: Base Class Weapons & lt; Item class armor & lt; Item   

I have to implant:

myCharacter.weapons

is_maya: via weapon, :: character_items Not working, I want the same thing as the item, but only to get the "weapon" items I want to filter with the "Type" column.

Thx for help

PS: I am on Rail 4

is_many: via weapon, :: character_items, terms: {character_items: {type: "weapon"}}, class_name: "item", source :: item

Hope

Answers from the matrix: Helps answer:

  is_maya: arms, {Via: character_ts, source :: items}, - & gt; {Where (type: 'weapon')}    

sql - SqlDataReader Read Order Different Than Query -


I have a query that I execute on SQL Connection and make a reader from SqlCommand.ExecuteReader. I'm doing a simple selection * from the table * I am not using any order, but the results from the query are always returned in one order when run in the management studio. 1 2 3 4 But when I do a reader Read () order is not the same. I think a random record is being drawn 3 2 4 1 Anyone can know why this could happen?

If you do not say ORDER BY, ADO The Net is free to return the rows in any order. Why do you complain?

People often mistakenly believe that the sequence of rows will be clustered ... or if they use a group, then it will be in this order ..

< Strong> Sometimes these assumptions always depend on implementation details and specific execution plans.

The only way to get the guarantee order is by order to use your result, something else is wrong, or you do not care about the order.

BTW, it does not always mean a performance hit for sorting, the SQL server is very smart and if it knows that the rows have already been sorted (such as it's your Order reads from the index based on the call), it will not do anything.

android - Starting a new activity after info is received in other thread -


Here is a part of my code: After clicking the button, the connection to the new thread and server has started. If the connection is successful, then the app should start a new activity and end the current. Can anyone explain what is the best way to do this?

  transThread.submit (new runnab () {public void run () {guiProgressDialog (true); if (user.length () & lt; 4) GUINotifyUser (" Must be at least 4 characters! "); And if (pass.length () & lt; 4) GUINotifyUser (" The password must have at least 4 characters! ") Else if (! Pass.equals GUINotifyUser (" Your Email Do not have a valid email address! "); Else if (fname.equals (" ") || lname.equals (" ")) guiNotifyUser (" All fields are mandatory! "); {Try {end string message = Autodiscovery Htp on strike signup (user, md5 (pass), mail, fnn, la A); guiNotifyUser (message); // If the message is equal then new activity starts} catch (exception e) {e.printStackTrace ();}} guiProgressDialog (wrong);}} break;; / Code>   

You can use it to show how to do it.

I personally want to use asyncTask for this. You can do your work in doInBackground () , then post it to Start on on and activity or You should also UI

AsyncTask

Edit the code in the comment

I can not say that you are doing without any kind of logic, but the first problem is that when you Start asyncTask in context You do not want to use getApplicationContext () especially the way you are not I think that Paco is getting a NPE because reference has not been started yet, if you are passing context in constructor, you can do this However, it seems that your asyncTask is an internal class register activity / Code> which means that it has access to all the member variables of register activity and its context . This means that you can use context instead of RegisterActivity.This to start your activity .

  @Override protected void onPostExecute (string result) {super.onPostExecute (results); // if (result == "successful registration!") // string i; // I = "da"; Context.startActivity (new intent (register activity. This, login activity class)); // Change it here   

As stated, your constructor is not required for context if its internal class but if it was a separate file then This

  class register is asyncTask and lt; String, zero, string & gt; {Reference reference; Personal RegisterTags (Reference Reference) {this.context = context; Use the variable (reference) given in the constructor above / /    

android - Background Service to take picture with Camera -


I know there are so many questions about it, but I think that whatever problem I am facing None of them is addressed in either. The problem I have written this service with all the different questions is that I am getting "success" in all attempt-grab blocks in the Austrade Common Command, but the logs are not being processed in the callback message (shuttercollback and picturecolback). What I think is that it means that the photograph has been taken but the callback has not been called, which is strange.

  camera camera; Parameter param; Chitraklak Rawcrollback = New ImageCollection () {Public Zero (Byte [] Data, Camera Camera on Chitrutoot) {Log D. ("Camera", "painting on-raw - raw"); }}; Shutterclub shuttercollback = new shuttercallback () {public zero} on shutter (log.i ("camera", "ontitterred");}}; @Ivoride public IBir on reboot (intent arg0) {// to-auto object method stub returns Null;} @Override public int onStartCommand (intended intent, int-flags, int startId) {try {cam = Camera.open ()} log. I ("camera", "success");} hold (runtime exception e } {Log. ("Camera", "camera is currently unavailable"); e.printStackTrace ();} try {param = cam.getParameters (); cam.setParameters (ultimate); log.I ("camera", " Support ) "}; {Hold (exception E1) {Log.e (" camera "," parameter problem "); e1.printStackTrace ();} {try SurfaceView view = new SurfaceView (this); cam.setPreviewDisplay ( See.getHolder (); cam.startPreview (); log.I ("camera", "success");} catch (exception e) {Log.e ("camera", "surface problem"); e.printStackTrace (); Try {cam.takePicture (shuttercollback, rawcollback, blank); log.i ("camera", "success");} hold (exception e) {Log.e ("camera", "click failure" ); E.printStackTrace ();} Cam.release (); Return Super. Onboard Commands (Intent, Flags, Beginners); }    

You should not release the camera immediately after moving. The graphic method executes callback to you To give the camera enough time to do it BTW, you also want to add JPG callback Apart from this, the stop preview can be said before the camera is released. Your code will look below:

  Camera camera; Parameter param; Chitraklak Rawcrollback = New ImageCollection () {Public Zero (Byte [] Data, Camera Camera on Chitrutoot) {Log D. ("Camera", "painting on-raw - raw"); Camera.stopPreview (); Camera.release (); }}; PictureColubbackJPGCallack = New ImageCollection () {Public Zero (Byte [] Data, Camera Camera on Chitrutut) {Log D. ("Camera", "Painting on - JPG"); Camera.stopPreview (); Camera.release (); }}; Shutterclub shuttercollback = new shuttercallback () {public zero} on shutter (log.i ("camera", "ontitterred");}}; @Ivoride public IBir on reboot (intent arg0) {// to-auto object method stub returns Null;} @Override Public int onStartCommand (intended intent, int-flags, int startId) {try {cam = Camera.open ()} log. I ("camera", "success");} hold (RuntimeException e) {Log.e ("Camera", "Camera is currently unavailable"); e.printStackTrace ();} Try {param = cam.getParameters (); cam.setParameters (ultimate); log.I ("camera", " Success ");} hold (upper E1) {Log.e ("camera", "parameter problem"); e1.printStackTrace ();} {try SurfaceView view = new SurfaceView (this); cam.setPreviewDisplay (view.getHolder ()); cam .startPreview (); log.i ("camera", "success");} hold (exception e) {Log.e ("camera", "surface problem"); e.printStackTrace ();} try {cam. TakePicture (shuttercollback, rawcolbback, blank); log ("camera", "success");} catch (exception e) {Log.e ("camera", "click failure"); e.printStackTrace (); } // commented on the following line and it was brought to your callback // camera .release (); Return Super.Onstart Commands (Intent, Flags, Beginners); }    

javascript - requestAnimationFrame and knowing when the browser is re-painting? -


Is there a way to find out that the browser is actively using requestAnimationFrame ? P> For example when I switch from tab to one running requestAnimationFrame , the function closes, when I turn it back on, the best way to deal with it What is it?

If requestAnimationFrame is running 100% then you can check that :

  window.addEventListener ('blur', function () {// full not running}, false);   

and

  window.addEventListener ('focus', function) (// optimal running (if used)}, false) ;   

This can be detected as we know the requestAnimationFrame trigger rate (in most browsers) reduces when the window (tab) is not active ( IF is being used - it really depends on the code requestAnimationFrame ).

If you want to run it continuously, then you can insert a mechanism like this:

  var isActiveTab = true; // function myLoop () {// Update with the events above my cool stuff is here (ifActiveTab) {requestAnimationFrame (myLoop); } Else {setTimeout (myLoop, 16); // Apply force (vblank sync is not required / when the display is not updated}}   

Note that the rate reduction for requestAnimationFrame is not part of the standard and it is a browser Exclusive is the implementation.

how can I create ibook shelves like-style user interface for android? -


I just want to ask about making a UI and choosing a book like ubook-shleves to have a functionality

Enter image details here

I want it

Thank you very much

is an open source project It does the same: you can download the project and copy the code Moments can.

The idea behind this should be a list view with a custom adapter.

PayPal System error 550006 in Android app -


I am trying to create an Android app with PayPal available in-app purchases. Everything works fine in Sandbox mode, but when I switch to Live Mode, I get this error:

Payment Failed System Error (550006). Please try again later.

I can find that only documentation says that this error means "the app is not authorized for app caller."

These changes are made to live from the sandbox I am missing something?

  • My app's position on PayPal has been 'Approved for approximately 24 hours'
  • I changed PaymentActivity.ENVIRONMENT_LIVE from my configuration environment PaymentActivity.ENVIRONMENT_SANDBOX.
  • I have changed my client ID's Live ID
  • I changed my receiver email to live from the sandbox.

    One concern is that I have an account for me that I am trying to pay with my wife's paypal and they use the same checking account. However, I do not think this is a problem because if I try to send my account from my account to my account, then I receive error 579033 ("The sender and each receiver should have separate accounts").

    Any thoughts?

    The problem is resolved. PayPal recently released PayPalAndroidSDK.jar version 1.0.3. It can be downloaded from GitHub:

curl - Run composer with a PHP script in browser -


It is possible to execute composer with a little PHP encoding from the browser because I don

Surely you can do this with curls?

Yes, you can run composer with a little PHP wrapper. All the composer source codes are available for the file, so it can be removed and then you can run after setting an encoding interface to replace the composer, rather than the commands that come through the command line.

If you setup your directory structure like this:

  ./project/project/composer.json ./project/composer.lock ./project/webroot/ ComposerExtractor.php ./project/ var /   

Place the code in Composer Extractor.php and then run it from a web browser, the composer should download all these libraries to: / P>

 . / Project / vendors /   

Also generate class-loader files in that directory.

Composer Extractor.

  & lt ;? Php define ('EXTRACT_DIRECTORY', "../var/extractedComposer"); If (file_exists (EXTRACT_DIRECTORY '/ vendor / autoload.php') == true). {Echo "ejected autoload is already present as it is already extracted. Phar extraction is being omitted". } And {$ musician PHhar = new Phar ("Composer.phar"); //php.ini Settings phar.readonly to 0 $ composer Fhar- & gt; Should be set to extractTo (EXTRACT_DIRECTORY); } // This form has been successfully removed. Need_once (EXTRACT_DIRECTORY. '/ Vendor / autoload.php'); // composer classes use composer \ console \ application; Use composer \ command \ update comand; Use Symfony \ Component \ Console \ Input \ ArrayInput; // To get out of Webroot so that the files of vendors can not be made in // which will be visible to the inthegaon chdir ('../'); // command $ input = create new ArrayInput (array ('command' = & gt; 'update')); // Create an application and run it with $ application = new application (); $ Application & gt; Run ($ input); ? & Gt;   

Although this is possible, this is not a great idea, but if you can not use a host that gives you SSH access, then it may be necessary.

I firmly recommend getting a steady IP address for myself or your office and then only restrict access to your own IP, as well as possibly to this script. After deleting it on the server to prevent it from accidentally running again.

html5 - div elements will not line up properly (side by side) -


नीचे दिए गए कोड ASP MVC3 दृश्य से है। पहले दो "कंटेनर" div तत्व ( topDiv और middleDiv ) बस ठीक काम करते हैं। फ़ील्डसेट ठीक से बाएं से दाएं संरेखित करें हालांकि, नीचे डायव तत्व नहीं है इस "कंटेनर" में leftDiv को BigDiv "कंटेनर", और नीचे rightDiv हवाओं के दायीं ओर सभी तरह की पंक्तियां हैं leftDiv तत्वों और स्क्रीन के बायीं तरफ।

जाहिर नहीं, इतने महान डब्ल्यू / एचटीएमएल / सीएसएस पोजिशनिंग (इन डिवेल तत्वों में से कोई भी इस समय उनसे सीएसएस संलग्न नहीं है, बस सब कुछ तैयार करने की कोशिश कर रहा है), इसलिए अगर कोई मुझे बता सकता है कि क्या था उस पर जाकर बहुत सराहना की जाएगी

चूंकि सभी fieldsets संयुक्त में 1000 से अधिक HTML / Razor वाक्यविन्यास हैं I कोड के उस क्षेत्र को जोड़ते हैं अगर किसी को विशिष्ट fieldet देखने की जरूरत है तो मुझे पोस्ट करने में खुशी होगी

  & lt; div id = "BigDiv" शैली = "स्पष्ट: दोनों;" & gt; @ Html.HiddenFor (model = & gt; model.CreatedDate) @ Html.HiddenFor (मॉडल = & gt; मॉडल। क्रिएटेड ऑपरेटर) @ एचटीएमएल.हिडेडफ़ोर (मॉडल = & gt; मॉडल। रेफरेंसएनंबर) @ एचटीएमएल.हिडेडफ़ोर (मॉडल = & gt; मॉडल संदर्भ टाइप करें) @ एचटीएमएल। हइडडेफ़ोर (मॉडल = & gt; मॉडल। एक्स्टरेप्टी टाइप) @ एचटीएमएल.हिडेडफ़ोर (मॉडल = & gt; मॉडल.रागियन) @ एचटीएमएल.हिडेडफ़ोर (मॉडल = & gt; मॉडल.आईएनडीडीआईस्ट) & lt; div id = "topDiv" & gt ; & Lt; div class = "leftDiv" शैली = "चौड़ाई: 450px; फ्लोट: बायां;" & gt; & Lt; fieldet id = "एजेंट प्रकारफ़ेल्ड" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; / div & gt; & Lt; div वर्ग = "राइटडिव" शैली = "चौड़ाई: 450px; फ्लोट: बायां;" & gt; & Lt; fieldet id = "DistributionFields" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; div id = "middleDiv" & gt; & Lt; div class = "leftDiv" शैली = "चौड़ाई: 450px; फ्लोट: बायां;" & gt; & Lt; fieldet id = "BasicFields" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; / div & gt; & Lt; div वर्ग = "राइटडिव" शैली = "चौड़ाई: 450px; फ्लोट: बायां;" & gt; & Lt; fieldet id = "DRMFields" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; div id = "bottomDiv" & gt; & Lt; div class = "leftDiv" शैली = "चौड़ाई: 450px; फ्लोट: बायां;" & gt; & Lt; फ़ील्डसेट आईडी = "पता-फ़ील्ड" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; fieldet id = "CommunicationFields" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; / div & gt; & Lt; div वर्ग = "राइटडिव" शैली = "चौड़ाई: 450px; फ्लोट: बायां;" & gt; & Lt; fieldet id = "DSSAgentIds" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; fieldet id = "DSSFields" शैली = "चौड़ाई: 400px;" & gt; ... & lt; / fieldset & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; p & gt; & Lt; इनपुट प्रकार = "सबमिट करें" मान = "सहेजें" / & gt; & Amp; nbsp; & nbsp; & amp; nbsp; & nbsp; & nbsp; @ एचटीएमएल.एक्शनलिंक ("खोज पर वापस", "इंडेक्स", "एजेंट") & lt; / p & gt; & Lt; / div & gt;   

यहां परिणाम का एक स्क्रीन शॉट है निर्माता जानकारी और वितरण topDiv के बाएं और दाएं divs हैं मूलभूत और DRM को middleDiv लिखें। पते में addressFields fieldet में नीचे डाइव से मेल खाता है (जाहिर है)।

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

यहां स्क्रीन शॉट है पृष्ठ का निचला हिस्सा। डीएसएस एजेंट आईडी पहले fieldet में RightDiv में bottomDiv तत्व है

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

इस टैग को नीचे डाइव में जोड़ना

  और 

निश्चित रूप से यद्यपि क्यों नहीं। अगर कोई बेहतर जवाब दे सकता है तो उसे स्वीकार करना अच्छा लगेगा थ्क्स

ruby on rails - Rspec test Comparable -


I have a model that uses comparative and I required & lt ; = & Gt; For this method how should I go about this w / rspec test (I know that this is not TDD because I have already applied the method)?

  class grades & lt; ActiveRecord :: Base includes Comparable def & lt; = & Gt; (Other) self.sort_key & lt; = & Gt; Other. Sort_key end end    

See the following grade implementation Occurred:

  class grade attr_reader: sort_key def initialize (sort_key) @sort_key = sort_key end def & lt; = & Gt; (Other) Returns blue until that other. Pamped_to? (: Sort_key) @sort_key & lt; = & Gt; Other.sort_key end end   

I test that grade # & lt; = & Gt; behaves properly, which is for object # & lt; = & Gt; Says:

  # comparable_grade.spec "Grade # & lt; = & gt; Do this while doing" When both operands are equal "(Grade. New (0) <= Grade.New (0)). "(Grade.New (0)  = & gt; Grade.N.N ("Foo") (Zero ) (Grade.New (0) <= 'gt; "foo") should be (zero) (Grade. New (0)    

internet explorer - CSS font size not being respected -


I have a font size set in the CSS class, which is set to size 10px, it is fine on my PC and other Dev's PC Works, but when clients use the site, they get a larger text size. We've checked our browser settings and the text size is set to Medium like our PC. This is an internal web app and all users (and our god) use Internet Explorer 8.

Can the web application overwrite our CSS settings? Is there any other browser or OS settings that can interfere?

Font size and family are:

  font-family: MS Sans Serif, Vernana; Font size: 10px! Important;  

Is "client intranet settings" or "compatibility view" enabled in IE? ? They will make IE8 an excuse to be IE 7, which may account for differences in rendering.

powershell - Append CSV output coding issue -


Hello, I created the script below to audit local administrator groups on remote script. It works fine, but since it only outputs data through all the hosts, I am afraid the array buffer will be out of place before getting the chance to export the CRV, so I am trying to make it Attach the output from each host because it goes through the list, except that I can not display the header on the first line and the editable lines below it I add. When I try to attachment below, I get the output given below. I must be an itemized word header and the other information should be listed in the next line. What am i doing

@ { Server = PC1; Subscribers = Administrators; Distinguished Name = DC = Domain, DC = Com

should look like this. It looks like this if I do not get attached and I make it a CSV after it ends through the list of Hosts

  server member-specific name host 1 administrator; Admin2 DC = DOMAIN, DC = COM $ server = get-content "C: \ script \ ad audit \ local admin \ workstation .txt" $ output = "c: \ Temporary local administrator audit $ CurrentDate.csv" $ result = @ () $ Disconnected = "No" Respond to foreign currency ($ server in server $ server) {$ connected = test-connection $ server-number 1 -quiet if ($ connect) {"$ server response" | Out-File- "C: \ Temporary Local Admin Goodhostes $ Current DataTax"} and {"$ server did not respond". Out-File-Aided "c: \ temp \ LocalAdmin badhosts $ CurrentDate.txt"} $ group = [ADSI] "WinNT: // $ server / admin" $ members = $ group.Members () | InvachMember ("name", 'GetProperty', $ null, $ _, $ null)} $ result + = new object PsObject -Property @ {DistinguishedName = (get-adcomputer ($ server)) -properties * | Select Distinguished Name). Specified Name Server = $ Server Member = $ Member-Joa ";" } $ Results | Export-CSV $ Output -Nautemapation} `  

if ($ connect - $ true) {new-object PSObject-property @ {Distinguishing Name = (Get-ADComputer $ _) .DistinguishedName Server = $ _ Members = $ member-whatever ";" }} And {write-host "}"

My suggestion is to use pipelines Instead of a novel statement, so the file on each object file is written as soon as possible.

  $ server | $ $ For every object Connect = test-connection $ _- number 1 -Quiet -ErrorAction SilentlyContinue $ state = if ($ is connected) {"$ _ replied"} and {"$ _ did not respond" } $ State | Out-File - Append "c: \ temp \ LocalAdmin goodhosts $ CurrentDate.txt" $ group = [ADSI] "WinNT: // $ _ / admin, group" $ members = $ group.Members () | If ($ connect) {new object PSObject -Property @ {DistinguishedName = (get-adcomputer $ _). Specific domain name = $ _ members = $ member-included ";" }}} | Export-CSV $ Output- Any Type Information    

How to make a certain piece optional in a NLog layout pattern? -


I have a custom layout renderer whose name is Job it provides several items, which Our app Used in configurations like this:

  & lt; Variable name = "jobHost" value = "$ {job: item = host}" /> & Lt; Variable name = "jobService" value = "$ {Job: item = service}" /> & Lt; Variable name = "jobNS" value = "$ {job: item = ns}" /> & Lt; Variable name = "jobName" value = "$ {job: item = name}" /> & Lt; Variable name = "jobKind" value = "$ {job: item = type}" /> & Lt; Variable name = "jobScheduleId" value = "$ {job: item = schedule}" /> & Lt; $ {JobService} NS: $ {JOB NS} N: '$ {jobName}' K: $ {jobKind} S: $ {jobScheduleId}: variable name = "jobLayout" value = "[H: $ {jobHost} S: ] "/> & Lt; $ {Longdate} [$ {threadid}] $ {machinename} $ {jobLayout} $ {uppercase: inner = $ {level}} $ {logger} - $ {message} $ {Onexception} $ variable name = "layout" value = "$ {longdate} : $ {Newline} $ {exception: format = toString: innerFormat = ToString: maxInnerExceptionLevel = 2}} "/> & Lt; Goal & gt; & Lt; Target name = "threadlog" axis: type = "thread specific tag" /> & Lt; Target xsi: type = "SplitGroup" name = "All targets" & gt; & Lt; Target name = "textfile" xsi: type = "file" filename = "c: \ log \ quartzbackgroundEngine.txt" layout = "$ {layout}" /> & Lt; Target name = "console" xsi: type = "colored console" layout = "$ {layout}" /> & Lt; / Target & gt; & Lt; / Targets & gt;   

When the layout renderer decides that no job-specific data is available, then the string in the log message [H: S: NS: N: '' K: S: ] Contains . I want to take it out.

So, I tried to replace $ {jobLayout} with $ {jobLayout}: when = Job Name! = Â ???? A ????} , but it does not work because analog thinks that job layout should be in line with a variable rather than a layout renderer, which is a matter here.

How can I change my layout so that $ {jobLayout} only if $ {jobName} is not empty?

I have a problem where I wanted to display a particular formatting when a variable is not empty Was there.

I took some inspiration

P>

$ {when: when = length ('$ {jobName}') & gt; 0: Inside = $ {Job Layout}}

I'm not sure that you will get 100%, but this is a step in the right direction.

javascript - Gzipping file using Ajax Minfy tool -


I was wondering if it is also possible to use the Ajax Minfi device for the Zip Zip. When it runs the command line tool during the conversion, it shows how much% it compresses and how much can be zipped zip but it does not actually have zip zip. It only compresses. Then it zip using this tool. It is possible to do

JSP communication should be done by the server, because the server knows that the customer data Are able to uncompress Is not it or not? If the webserver is properly configured then it will handle it transparently for you.

In lighttpd you can enable compression like this:

  server.modules + = ("mod_compress") compress. You want compress.filetype = ("application / x-javascript", "application / javascript", "text / javascript", "text / css", like "Cache-dir =" / var / cache / lighttpd / compress / , "Text / html", "text / plain")   

for more information.