Thursday, 15 March 2012

sharepoint - WSS error when trying to check out PDF files -


I have a strange problem in WSS 3.0. It uses form-based authentication and is under ISA. I can see any file except PDF files. When I check a PDF, I think "value does not come within the expected range." I suspect it has to do something with ISA and where SSL is finished.

For the current issue I have tried various AAM settings and nothing seems to be that the site does not matter in all its functions.

I noticed that "the price is not within the expected range" form service with an upload field the other day To decide for me the form was to add enctype = multipart / formdata to apply. Master form tag. Probably unrelated but worth exploring.


PostgreSQL copy permissions from another table -


Is it possible to copy user permissions from one table to another in a table in a postgresql database? What is the point of updating the pg_class.relacl column value for the table of value for the source table, such as:

  UPDATE pg_class SET relacl = (SELECT relacl fg pg_class WHERE relname = 'Source_table ') Where relname =' target_table ';  

It seems to work, but can I do anything else that needs to be done with this method or am I missing other 'gatakas'?

Thanks for any answers.

pg_dump will be used if you can use command line instead of SQL :

  pg_dump dbname -t oldnamename -s \ | For example '^ (GRANT | REVOKE)' \ | Sed 's / oldtablename / newtablename /' \ | Psql dbname  

I find a UNIX server in Windows I use pg_dump -s in a file, manually edit it and then it I can import into a database.

Perhaps you will need to copy the permissions of owned sequences from this table - pg_dump will work.


ruby - SOAP calls using EventMachine -


Is there a way to create non-blocker SOAP requests in event macenes?

I'm creating a Ruby app that interacts with the Google AdWords API (which is SOAP based), using the adwords4r gem. The app uses the EM to receive messages on stomp connections, and then SOAP calls the messages through the AdWords API. Obviously I need to non-block those calls, because the processing reactor will be within the thread. One option would be to use EM.defer, but I would not overhead a bunch of threads in a Threadpool.

You can use EventMachin.


ruby on rails - flickr-fu simple example not working -


I am using flickr-fu gem inside a Rail application for flickr api integration. I am following sample code to set up a web app shown below:

  def flickr_create flickr = flickr.new (file.join (RAILS_ROOT, 'config', 'flickr .iml ')) Redirect_to flickr.auth.url () is read the end DEF flickerback flicker = flickr.new (file (RAILS_ROOT,' config ',' flickr.yml ')) flickr.auth.frob = params [: Frob] current_user Update_attribute: flickr_token, flickr.auth.token.token flash [: notice] = "successfully certified with flickr" redirect_to: flickr_stream end  

I call Flickr_callback as callback method Flickr which is registered After the call authorization process.

When I try and hand over the params [: frob] to flickr.auth.frob, the problem is with the line in flickr_callback, I get the following error:

Exposing Flickr :: Ash: 0x24b3640

For 'frob =' Even if I only need 'flickr_fu' console, create a new flickr example, and assign to the frob I try to do it, I get the same error, I took a look at the source of the gem on Gitobb, and Setter Frab = Flickr :: Is set in Thulud module, so I do not know that error where the API call successfully work and are beginning to recover Flickr object.

The issue is that the gem version from Flickr-Foo ammeter or github is at 0.1.4, Setter method was not implemented until the next version was made. Instead install gem commonthread-Flickr_fu v0.3.0 from github, and frab is writable.


debugging - Does anyone know of a computer programming work patterns site? -


There are all design patterns wiki - you know, with singletons, iterators and everyone. I'm not looking for that. I'm looking for a level from that level: Computer programming patterns are working like "debugging", "retreat and solvarsor problems, first" and so on.

EDIT: Clearly, I am interested in personal work practices rather than team think PGP rather than playful.

If there is no such site, then maybe I will start one but do not recognize any aspect (oops - which must be re-searched TheWheel) if there is already one.

The answer to win will be one that is either the URL of a site that you think describes, or the answer to a particular confidence is that there is no such site there.

How to create an extra non-digit wiki for the URL to remind me how to open your wiki (There is just a little better than Wikipedia? page ?).

ps I do not really like CamelCase but if I'm used on this site, I'll manage.

is the first place to look for such patterns, this is where I can get some information about this (maybe or). Actually, I find it hard to find anything on C2 which is sad because this wiki is actually a gold mine.


How to hide a modal dialogbox in MFC application? -


O people..I have a hard time hiding the medal dialog box ... to tell me exactly .. I am doing..I am trying to design a UI for my own application in MFC..This kind of setup helper .. 1 in the dialog box I have the next button, when I click on it 1 dialog box will hide second dialog box..when I have some rules in the 2 dialog box I have no debt to help me ...

I have never tried to hide a model dialog ... it can not be sure how it can be done.

Anyway, I think you do not need to hide the dialog but destroy the first one and create another one. You can use it to end a modal dialog.

But MFC has its own arrangement for creating a wizard of its own, see this class. I'm sure you can find thousands of examples.

Hope it helps.


c# - AutoMapper With Generic Type Inheritance -


I am trying to map CustomerDTO with AutoMapper to my domain unit ICustomer

I am using the interfaces for my domain model because the structure is injected in solid type from my LinkToSQL Database Infrastructure Layer.

  Public Interface IBaseEntity & lt; TPk & gt; {TPK ID {Received; }} Public Interface ICustomer: IBaseEntity & lt; Int & gt; {String Email {Receive; Set; }} [DataContract] Public class customer DTO {[Database] Public Int ID {Received; Set; } [Database] Public String Email {get; Set; }}  

Automapper mapping now

  Mapper Crescent & lt; Customer DTO, IC Customer & gt; (); Mapper Createmap & lt; ICustomer, CustomerDTO & gt; (); Mapper.AssertConfigurationIsValid ();  

Now where I am using mapping

  Public CreateCustomerServiceResult CreateCustomer (CustomerDTO Customer) {var Result = New CreateCustomerServiceResult (); {Var originalMapped = Mapper.DynamicMap & lt; CustomerDTO, ICustomer & gt; (Customer); Var newCustomer = _customerService.CreateCustomer (original map); Var newmap = mapper Dynamic map & lt; ICustomer, CustomerDTO & gt; (New customer); result. Customer = newmap; } Hold (Exception Pre) {} Return Results; }  

I have found a Dictionnary missing key exception on the "id" property ...

Got it!

The problem was due to the missing setter of IbSENTT's "ID" property.

Then everything changes works.

  Public Interface IBaseEntity & lt; TPk & gt; {TPK ID {Received; Set; }}  

python - Self import of subpackages or not? -


मान लें कि आपके पास निम्न है

  bb / __ init__.py b / cb / c / कुछ Python संकुल में, यदि आप  import b , आप केवल प्रतीकों को परिभाषित करते हैं बी में। बी को एक्सेस करने के लिए, आपको स्पष्ट रूप से  import b.c  या  b आयात c  से जाना होगा। दूसरे शब्दों में, आपको 

  import b import b.c import b.c.d प्रिंट b.c.d  

करना होगा अन्य मामलों में मैंने सभी उपपैकेजों का स्वचालित आयात देखा है इसका मतलब यह है कि निम्नलिखित कोड में त्रुटि उत्पन्न नहीं होती

  import b print bcd  

क्योंकि b / __ init __। Py लेता है अपने उपपैकेजों को आयात करने की देखभाल मैं सबसे पहले पसंद करता हूं (अंतर्निहित से स्पष्ट बेहतर), और मैं हमेशा इसका इस्तेमाल करता था, लेकिन क्या ऐसे मामले हैं जहां दूसरे को पहली बार प्राथमिकता दी जाती है?

मुझे नामस्थान पसंद है - इसलिए मुझे लगता है कि import b को केवल मिलना चाहिए जो कि b में है (संभवत: b / __ init __। Py में)। अगर बीसी , बीसीडी , या जो कुछ भी अन्य कार्यक्षमता को अलग करने का कोई कारण है, तो बस import b इसे सभी में नहीं खींचना चाहिए - यदि "इसे सभी में खींचें" ऐसा होता है, मुझे लगता है कि पता चलता है कि नेमस्पेस जुदाई संभवतः एक फर्जी है जो कि शुरू से ही हो। बेशक, मानक पुस्तकालय ( import os में भी उदाहरण हैं, तब आप os.path.join और पसंद कर सकते हैं), लेकिन वे प्राचीन हैं, अब पायथन पैकेजिंग सिस्टम परिपक्व और स्थिर होने से पहले मूल रूप से "ग्रैंडफिल्ड" चीजों की तरह। नए कोड में, जब आप इसे आयात करते हैं, तो मुझे दृढ़ता से सुझाता है कि किसी पैकेज को नहीं को उसके उपपैकेजों को सवारी के लिए खींचना चाहिए। ( इस को पायथन प्रोम्प्ट पर आयात करें और यह बहुत अंतिम पंक्ति को दिखाता है; -)।


arrays - What may cause losing object at the other end of a pointer in c++? -


Edit: I've found the error: I did not start an array with one size question could be closed is.


I have a square V and the second class is N . An object of N will contain an array of objects in the class V (say V ** vList ). So, there is a function like N V ** getList (); Now in some functions of other classes or just a driver function, if I say V ** TheList = (N) n.getList (); Q1: theList will be pointing to the first element of the array? Given that the size of the array is known, can I loop through the index i and say V * oneV = * vList [i] ? Please correct me if I am doing it is wrong.


I am using the debugger to find out through the whole process of running my program, the thing I found was that V * oneV = vList [i] , the values ​​of pointers in the array were the same, vList were identical, when they were created, but if I follow the indicator, where it is, pointing out that the object was gone. I am guessing that this may be the reason why I am getting a mistake or just getting the error, can this be the case? Why was the object 'loosened' on the other end of the pointer? what I have done?


And yes, I'm working on school work, so I do not want to print my code, I want to finish it myself, but I need help finding a problem. It seems that there is still a need for clarification on the array of signals. I would like to thank

Question 1 is correct second part For, V * oneV = vList [i] will be the correct syntax once in your syntax (one object type V are treated as pointers on such objects) are clearly crashing your code.

Edit: Since you will use the correct syntax, the reason for segfaults will depend on your memory management of types of objects V If you have stacks (automated wars, No entries in the objects created on the new or malloc and if you are trying to get it outside the outside, the indicators may be hanging and your code crashes. Will go


repository - Tortoise SVN Repo-Browser -


I was wondering if I right click on a file in the SVN repo browser, has it permanently removed goes? Can it be recovered?

You may be interested in SVN FAQ:

How do I remove files completely from the repository history?

There are special cases where you want to delete all the file's evidence or commit (Someone has accidentally created a confidential document.) It is not so easy, because Subversion has not been deliberately designed to lose information. Modifications are unchangeable trees which build on each other. Deleting an amendment from history has a domino effect, in later modifications produces chaos and possibly invalidates all working copies.

This project is planned, however, one code will svnadmin obliterate command which will permanently complete the removal of the information (see 516 points.)

In the meantime, your only resource is your code to svnadmin dump , then pipe the dump file via svndumpfilter bad path) a svnadmin load < / Code> in the command

If this is difficult, then there is little chance that this can be easily done with Turtle SVN ...
(And this is not the goal of source control. ..)


c++ - preorder an array based binary search tree -


I'm trying to order a BSD, I'm not sure how to do this.

You should consider recurring approaches instead of a recursive one. Tree traversal (preorder, indoor and postorder) is done very easily using recursion.

A pseudoscopy is a recursive algorithm, but there really is not much in it since you are accumulating a tree in an array, you will not have node pointers, just index.

You know that when you reach the nodes of the leaf, all right, their index will be beyond the end of the array.


.net - MsmqMessage<T> necessary? -


I am analyzing a BizTalk application (aka orchestra) that communicates with the WCF service via MSMQ. I was thinking that one of the WCF service implementations has an MSMMA message as a parameter in the service method. I was expecting contract type T instead of an MSMMAE.

This is not really an unidentified bond, because there is a specific MSMUP type in the WCF service system.

Is it really necessary to have an MsmqMessage binding type when communicating with a WCF MSMQ service from a BizTalk app?

This is the current code:

  Public Zero SaveDocumentASync (MsmqMessage & lt; MyDocument & gt; msg) {}  

It should:

  Public Zero SaveDocumentASync (MyDocument msg) {}  

As far as I remember, the reason for this is that you are using an MSM inactivebandbanding and not netmassbbiding. MsmqMessage & LT; T & gt; Provides access to MSMQ message properties (both on sending and receiving) which can be useful on many scenarios.


c# - .NET version of HTML Tidy? -


Does anyone know if there is a native port of HTML clean for the Net available? In Sourcesfor, there is a Tidbit project - which has not been updated since 2005 and looks like only one cover. Java Port is presently in the form of a JTD project.

HTML Clean Project Page:

You are right, arranged in some time. NET has not been updated.

An option SVN has links to the source code on that page.

"This cover is based on the cover provided by Adrian Batman

The main advantage of this net and wrapper is that it binds directly to the basic basic clean library , Which is written in C. Then it reveals a .NET class that can be used by any net application. HTML Clean Source, Including updates in the original HTML clean program, only the source files are available. However, due to the lack of C ++ .NET support on the Linux platform, the cover itself has been rewritten in C # and now to access the P / HTML clean library. Uses calls for. HTML is not normally written in C #, and at all times the latest source can be obtained only by updating sources. "


mysqli query, LIKE and AND in the same query doesn't work out like it should -


Then this is my query, it does not matter if it is set to approved 0 or 1, then it will give me all the rows Anyway select 'from' tutorial where the tag like '% php%' or tag like 'php%' or '% php' tag or tag = 'php' and approved = 1 < / Pre>

I think that is the reason for this or I may be wrong, if someone can help me on this :)

Try brackets

  S Tags such as '*% FROM` tutorial' WHERE (such as tags like '% php%' or 'php%' or '% Php' or tag = 'php') and approved = 1  

Java web frameworks -


I was seeing whether Django / ROR is equal in Java or not.

I found:

< P> Has anyone ever tried these frameworks, or do you know any other? Are they faster than the Denggo / ROR?

I searched Grails a year ago, and have not seen back. Take a lot of thoughts about Ruby's original ideas on the railway (the original was named Groovy on the railway), and there is a rich ecological mechanism of plugins / extensions. The Grails, and the underlying Grails language (Java's superset) program is a pleasure - you can really focus on its Gerum functionality (a layer on top of hibernate) is also very powerful, and the plugin system In addition, this is one of two reasons to check (you can use it in your Java application too)

Regarding coming with version 1.2, I think this feature-rich and on The Yapt mature should any developer in his Tulblt.

As a demonstration, it is definitely less compared to Java, but you have available to customize with Spring / Hibernate / J2A items, and you always have some important pieces The code can drop in pure Java. Some recent experiments have been done, with the permission to run the part of the Groovy code using the static method resolution, which together with invokanemic support increases large performance.

Update on the basis of additional qualifications

P> Scalability, productivity, documentation, and civil resources consumption

  • Scalability - You get proven java / spring / hibernate stack, although I can not say that grails provide very self Does. Productivity - The main reason for using Grails is that you have a display overhead, but Grails is what you use when the time / productivity of development is more important. Documentation - Grails document is great, and there are at least three good books written only on Grails Community is rich and very useful. I
  • Consumption of resources - This is a tradeoff Grails ( Partially due to the built-in Java stack) is resource-intensive. If I was making something like Google, Grails would not be liked, however, in any web app of any sophistication, you do well for caching solutions, the same applies here.

java - DB2 database using unicode -


I have a problem with the DB2 database which should contain Unicode characters. The connection is established using JDBC. INSERT (1, N 'N') values ​​in my_table (id, string_field) values, what do I have to do if I want to insert a Unicode string into the database? My unicode string '); INSERT (1, 'my unicode string') in

or

  my_table (id, string_field) values;  

I do not know whether to use N-prefix or not for most databases there works great when using it but I am not quite sure about DB2 . I also have a problem that I do not have a DB2 database where I can test these statements. :-(

Thank you very much!

document (DB2 form) In this) 9.7) It says:

A graphic string constant specifies a different graphic string in which there is a sequence of double-byte characters which are single-byte apostrof (') Starts and ends, and it happens before a single byte or n. The letter between the apostrophes should represent any number of bytes, and the length of the graphic string should not exceed 16 336 bytes.


mysql - A SQL story in 2 parts - Are SQL views always good and how can I solve this example? -


I am creating a reporting app, and so I am suppressing very terrible statistics. To create an app in a tight way, one part of your perspective is to use SQL visuals if more than one user is going to take away the DB straining away from all.

An example is:.

  mysql_query ("View View View_CylverPapa_clicks_baby_ $ Select Email SELECT view_email_baby_position.EmailAddress, view_email_baby_position.days, silverpop_campaign_emails.id, silverpop_actions.` click name`, silverpop_circrym. 'Mailing ID` silverpop_uploadsInNER Join On the eMail_baby_position (SilverPop_action.mail = view_mail_bb_position.emailAddress), silverpop_campaign_emails where silverpop_campaign_emails.id = $ email and view_email_baby_position.days silverpop_campaign_emails.low and silverpop_campaign_emails.high and silverpop_actions.Event Type` = ' The book ') or (among the dead mysql_error ());  

And then this later click on the script has a special taste of this email that is used to calculate the number. '' Name '' as 'count' in the form of counting from `visible_silverpip_clicks_bab_ $ email` in the form of` $ sql = "selection number (*);

My question is actually in 2 parts:

  1. Is the ideas always good? Can you have too much?
  2. Can I create a group of other ideas to cache the counting variable in the second snippet of code. If so, how can I reach it? I can not quite know it yet

Thank you!

"itemprop =" text ">

After answering your questions

1.) I do not know that I can think of an example when the scenes and the bad ones are themselves, but it would be bad to use them unnecessarily. Depending on your situation you may be too much.

2.) Counting variables will not be cached because of one more set of ideas, so it will not be beneficial from that point of view.

After saying this, I think that you have a misunderstanding. Is there really a view? A view is just a definition of a particular SQL statement, and it does not cache data. When you select a from MyView *; , the database is still being executed as defined in the Definition View statement that it would be created if a user was executing that statement.

Some database vendors present a different kind of view, which is called physical view. In this case, the necessary table data is stored / cached to create the view and it is usually updated when the refresh rate is specified when you create it. It is "heavy" in this sense that your data is stored twice, but can make better execution plans because the data has already been gathered, collected. Note However, you only see data based on the last refresh of the physical scene, where you are viewing the data with a normal view because it currently exists in the underlying tables, MySQL does not currently support physical ideas.

Some useful uses of ideas are as follows:

  • Create easy / cleaner SQL statements for complex queries (whatever you are doing)

  • Security. If you have tables where you want a user to be able to see some columns or rows, but not other columns / rows, you restrict access to the base table and create a view of the base table which only Selects columns / rows that user should also have access.

  • Create aggregates of tables


java - Compiling a servlet in Windows XP -


How do I compile and run servlets from a command prompt?

I get an error when I compile it to use

text ">

How do I compile and run servlets from the command prompt?

For the first part of the question, :

  javac -cp $ TOMCAT_HOME / lib / servlet-api.jar * .java  

For the second part, which you are trying to get The purpose of a servlet is to be packed in the war and is deployed in servlet containers (eg tokkat). In a cell, the main () and No, it is not intended to run on the command line.

Actually, you should start with a good tutorial and get some IDE support. Netbans is not my favorite ID but they have There is very good educational content and in your case, I think this will be a good starting point.


How can I read bytes from a file in iphone application, chunk by chunk? -


I am trying to apply an iPhone application that can read certain bytes from a file and another file Can store in This process runs up to the end of the file. I am very new to the iphone application so please help me on what is the parent category for this specific type of implementation?

I had a large file that can not be read with NSData methods, so I used the following (Fine grain control for TechZen's suggestion for copy).

NSFileHandle * fileHandle = [NSFileHandle fileHandleForReadingAtPath: filePath]; [File handle tootfoil offset: offset]; NSDTA * data = [read filehandleDataOfileAMTH: length];

Django Dynamic Forms -


I am using to create a dynamic form. I have everything work, but save the data in the database. Has anyone got any code that does this or can show me that what is the best way to do this model should be established?

save () override method on your form class:

def save (self): new_user = User.objects.create_user (user name = self.cleaned_data ['username'], email = self.cleaned_data ['email'], password = self.cleaned_data [ 'Password1']) returns new_user

(taken from James Bennett's blog)


How do I prevent an error 2101 in Access when I have a button to save a record on a form? -


I think there is something like this (and I believe I was working once)

I

Button's onclick handler is basically a

  private sub BTNSA_click (), which is a combination with some bound control and a button The record is. Me.dirty = false end sub  

Since I need to check the values ​​entered, there is still an on-up update handler:

  Private sub form_beforeupdate (cancel as integer)) if nz (me.SomeControl, "") = "" msgbox ("....") cancel = true exit sub end if '... check more .. End end  

Now, when I click on the button, and the handler reaches me.dirty = false, the execution flow goes to the update handler earlier, which is expected She goes. Since the ice-control is not filled, the cancellation has been set to the right and all is finished, which is still expected.

The problem occurs when the execution flow comes back to the button. The line me.dirty = false prevents execution and run-time error '2101' is not valid for the setting you enter this property is filed.

This is not expected and I really believe that I have to do this work.

Anyway, how do I do the first save button together with the predecessor handler?

Do you need to save the record at this point, given that the default for saving access is? If this is the case, then the error will likely be framed:

  Personal sub btnSave_Click () error GoTo Err_Handler at Me.Dirty = False Exit_Here: Exit sub Err_Handler: If Err.Number = 2101 then ' Neglect or message like MSBBX error Descriptration and if you want to resume, exit_array and all  

hibernate - hbm2ddl on a column based on GenericEnumUserType -


The following JPA column definition generates an "integer" data type by default on all databases (like H2, mysql, postgres )

  @Column (name = "type", nullable = false) @ type ("type =" com.mycompany.hibernate.usertype.GenericEnumUserType ", parameter = {@Parameter (name = "EnumClass", value = "com.mycompany.model.DegreeType"), @Parameter (name = "identifierMethod", value = "toInt"), @Parameter (name = "valueOfMethod", value = "fromInt"}}) @NotNull Private degree type type;  

I would like to use the minimum storage for this field and therefore This schema would prefer to use the columnDefinition parameter for the 2nd generation generation but it seems that the tintint is not supported in postgrave, but is supported in other databases mentioned above.

What is different depending on the database type Will it be possible to generate separate SQL files? 1. What is the best way to get it? 2. What will be the best data type (with minimal storage) C can be used for this purpose? Since you are using a custom type (why?), The definition of the underlying column (

"post-text" itemprop = "text">

S) your type of sqlTypes () will be generated on the basis of the result of the actual SQL column type will be derived from the appropriate colloquial .

And mounts from H2 / MySQL to tint .

Everyone said, I use generally :

  1. using @nomized annotations.
  2. Store value value preserves some space using the string instead of integer , but it identifies a major problem: 3 months below the line (Year) Any person changes the code by inserting another NM constant between your type and suddenly all your data becomes invalid Disk space is cheap; There is no such deal with issues. @Enumerated (EnumType.STRING) @ column (name = "degree_type", tap = incorrect, length = 0!) Personal degree type;


javascript - jQuery animation issues -


It's hard to understand, so I'll paste the function, and tell me what it does

Function Stop (R) {if (r! == Undefined) {$ ('# close'). Attr ('name', '1'); $ ('#closed') CSS ({top: 30, left: 30}); $ ('#closed') Html ('First Click Here'); } And {switch ($ ('# off'). Atri ('name')) {case '1': $ ('# off'). Atri ('name', '2'); $ ('#closed') Animate ({bottom: 30, right: 30}, 1000); $ ('#closed') Html ('Click Here Now'); break; Case '2': $ ('#closed') Attri ('name', '3'); $ ('#closed') Animate ({bottom: 30, left: 30}, 1000); $ ('#closed') Html ('A now click here'); break; Case '3': $ ('# close') Ether ('name', '4'); $ ('#closed') Animate ({top: 30, right: 30}, 1000); $ ('# Close') Html ('and finally click here'); break; Case '4': $ ('# close'). Remove (); break; If you need an explanation, then it becomes
  1. The closed function is called for the first time as close (1)

    . It determines the position above: 30 and left: 30. Keep in mind that its position in the stylesheet is already complete. This first part works, and wherever I want to choose it, it is followed.

  2. The #close element has an authorization specified by close () . Every time it is clicked, as you can see, there is a different action. Everything works fine except for the animation (i.e. HTML and name attribute change)
  3. On the last click, the element disappears successfully.

Do anyone have any ideas?

Cheers

The first time you < Code> left: set 30px . The second time you set right: 30px but left: 30px is still set. They are not special properties; The setting is thought to extend the element to fit the volume between 30px-left-edge and 30px-right-edge.

Although I think you have off element this address left: 30px; Correct: 30px; Width: 100px which is where correct property can be ignored, no movement is causing the same top / below / height .

In a left-hand alignment and right aligned position, you will only need a script for one of the left or correct to find out that the right side For the status of the left the pixel position will be, you have to see the size of the block containing the element. The inserted block assumes that the whole document is:

  & lt; Div id = "close" style = "background: red; position: full; width: 100px; height: 50px;" & Gt; Foo Lieutenant; / Div & gt; & Lt; Script type = "text / javascript" & gt; Var close_step = 0; Click $ ('# Close') (function () {if (close_step> = 4) {$ (this) .remove (); return;} var w = $ (window) .width () - $ (this) .width () - 30 * 2; var h = $ (.hit) - $ (this) .hit () - 30 * 2; var x = [0, 1, 0, 1] [pass_step] * W + 30; var y = [0, 1, 1, 0] [close_step] * h + 30; var pos = {left: x + 'px', above: y + 'px'}; if (close_step == = 0 $ (this) .css (pause); and $ (this) .mate (pg); $ (this) .text (['click here first', 'now click here,' and now click here Click ',' and finally click here '] [close_step]); close_step ++;} Click (); & lt; / script & gt;  

if Kiss # shutdown If you were nested with the position in the block, then you will need to see its width / height instead of window .


JQuery Tabs, problem altering selected element -


I am using a project, the tabling code looks like this: -

 < Code> & lt; Script type = "text / javascript" charset = "UTF-8" & gt; $ (Function () {var tabContainers = $ ('div.tabs & gt; div'); tabContainers.hide (). Filter (': first'). Show (); $ ('div.tabs ul.tabNavigation a '). Click (function () {tabContainers.hide (); tabContainers.filter (this.hash). Show (); $ (' div.tabs ul.tabNavigation a '). RemoveClass (' selected '); $ (This) .addClass ('selected'); return false;}). Filter (': first'). Click ();}); & Lt; / Script & gt;  

It works great, but the design requires that I insert the tags selected tags on the tag, not the tag. When I change the script to show / hide it for each tab brake, and any ideas on what needs to be changed? thank you in advanced.

  & lt; Script type = "text / javascript" charset = "utf-8" & gt; $ (Function () {var tabContainers = $ ('div.tabs & gt; div'); tabContainers.hide (). Filter (': first'). Show (); $ ('div.tabs ul.tabNavigation li '). Click (function () {tabContainers.hide (); tabContainers.filter (this.hash) .show (); $ (' div.tabs ul.tabNavigation li '). Delete class (' selected '); $ (This) .addClass ('selected'); return false;}). Filter (': first'). Click ();}); & Lt; / Script & gt;  

Without further information, it is difficult to answer your question. The most important missing information is your current HTML and CSS, because now it can guess why this does not work.

As described by gnarf, your code should change a bit to work on it, for example the page used by HTML and CSS, on which you got this code:

  & lt; Script type = "text / javascript" charset = "utf-8" & gt; $ (Function () {var tabContainers = $ ('div.tabs & gt; div'); tabContainers.hide (). Filter (': first'). Show (); $ ('div.tabs ul.tabNavigation li A '). Click (function () {tabContainers.hide (); tabContainers.filter (this.hash). Show (); $ (' div.tabs ul.tabNavigation li '). RemoveClass (' selected '); $ (This) .clostest ('li'). AddClass ('selected'); Return return;}). Filter (': first'). Click ();}); & Lt; / Script & gt; In addition, your CSS should also be changed, because  selected  class is now set to LI on A instead of LI. I wonder why you do not use the tab-plugin provided by the jQuery UI it lets you configure a lot of things and no code is required. 


https - Android NoSuchAlgorithmException: "SSLContext SSL implementation not found" -


  SSLContext संदर्भ = SSLContext.getInstance ("SSL");  

अपवाद में उपरोक्त पंक्ति परिणाम:

  java.security.NoSuchAlgorithmException: SSLContext SSL कार्यान्वयन नहीं मिला  

मैं Android 2.0 SDK का उपयोग कर रहा हूं और "TLS" निर्दिष्ट करते समय , इसे स्वीकार किया जाता है।

मुझे अपवाद कैसे मिलता है? एंड्रॉइड एसएसएल का समर्थन नहीं करता?

यदि आप डिफ़ॉल्ट सद्भाव जेएसएसई का उपयोग कर रहे हैं, "टीएलएस" है केवल प्रोटोकॉल का समर्थन करता है, जो SSLv3 के समान है।

आपको एसएसएल के पुराने संस्करण का उपयोग करने की आवश्यकता है।


ajax - Extjs to call a RESTful webservice -


I'm trying to call a restful webservice using extjs below the code I am using: < / P>

  Ext.Ajax.request ({url: incomingURL, method: 'post', parameter: {param1: p1, param2: p2}, success: function (ResponseObject) {var obj = Ext. Decode (responseObject.responseText); alerts (obez);}, failure: function (response object) {var obj = Ext.decode (responseObject.responseText); alert (obz);}});  

But this does not work, the request is sent using the OPTIONS method instead of POST.

I also tried to use the code below but the result was the same:

  var conn = new Ext.data.Connection (); Conn.request ({url: incomingURL, method: 'post', parameter: {param1: p1, param2: p2}, success: function (feedback object) {Ext.Msg.alert ('condition', 'success'); }, Failure: function (response object) {Ext.Msg.alert ('condition', 'failure');}});  

But when I try to use the original AJAX call (using browser objects directly ie xmlHttpRequest ()) or ActiveXObject ("Microsoft.XMLHTTP") then it works fine and I get the feedback as expected.

Can someone help me, because I can not understand what I am doing wrong with AJAX calls?

You can not create a standard AJAX call between domains. The URL relative to Ext.Ajax.request (relative to the origin of the script) must be.

If you want to make cross-domain calls, use ScriptTagProxy or such.


python - os.kill not raising an OSError, however I do not see the given pid running -


मेरे उबुंटू सर्वर पर मैं निम्न कमांड चलाता हूं:

  अजगर -सी 'आयात ओएस ; Os.kill (5555, 0) ' 

यह किया जाता है ताकि मैं देख सकूं कि क्या पंड 5555 चल रहा है। मेरी समझ से यह एक OSError को उठाना चाहिए अगर pid नहीं चल रहा है। यह मेरे लिए OSError नहीं बढ़ा रहा है जिसका अर्थ है कि यह एक चलने वाली प्रक्रिया होनी चाहिए। हालांकि जब मैं चलाता हूं:

  ps aux | | Grep 5555  

मुझे लगता है कि उस pid के साथ चलने की कोई प्रक्रिया नहीं है। यह सामान्य श्रेणी में कई अन्य पिक्स पर भी होता है, लेकिन यह 555 या 55555 के साथ नहीं होता है।

क्या किसी के पास कोई जानकारी है कि क्यों os.kill एक OSError नहीं उठाएगी जैसे कि यह अपेक्षित है

नोट: यह अजगर 2.5.1 के तहत चल रहा है।

के अंतर्गत लिनक्स, प्रत्येक प्रसंस्करण और प्रत्येक थ्रेड में एक अलग पिन होता है os.kill पर ध्यान नहीं है कि आपके पास कोई धागा पुड है या कोई कार्य pid है, हालांकि ps आमतौर पर धागा पाइड्स नहीं दिखाता है।

उदाहरण के लिए, मेरे मशीन पर पीआईडी ​​8502 के साथ प्रक्रिया चल रहा है धागे जो आप इस तरह देख सकते हैं

  $ ls / proc / 8502 / task / 8502 8503 8504 8505 8506 8507 8511 8512 8514 865 9 < / कोड>  

ध्यान दें कि 8503 प्रक्रिया सूची में दिखाई नहीं देता

  $ ps aux | Grep [8] 503 $  

हालांकि कुछ और ps तर्कों का उपयोग करके आप इसे देख सकते हैं

  $ ps-eLf | Grep [8] 503 एनसीडब्ल्यू 8502 1 8503 0 10 10:00? 00:00:00 / usr / lib / virtualbox / vboxsvc --automatic  

( के लिए grepping [8] 503 का अर्थ है कि grep दिखाई नहीं देगा - यह एक पुरानी यूनिक्स चाल है!)

अब देखते हैं कि यह जीवित है या नहीं

  $ python Python 2.6.4 (r264: 75706, 2 नवंबर 2009, 14:44:17) [जीसीसी 4.4.1] लिनक्स 2 पर अधिक जानकारी के लिए टाइप "सहायता", "कॉपीराइट", "क्रेडिट" या "लाइसेंस" '/home/ncw/.pystartup' से लोड किए गए कस्टमियां & gt; & gt; & gt; आयात ओएस & gt; & gt; & gt; Os.kill (8503, 0) & gt; & gt; & gt;  

यह आपकी समस्या का डुप्लिकेट करता है।

मुझे लगता है कि अगर आप करते हैं

  ls / proc / * / task / 5555  

या

  ps-elf | Grep [5] 555  

आप अपराधी धागा देखेंगे।


How do I access the individual styles of a CSS rule-set using JavaScript? -


अगर मेरे पास एक क्लास चयनकर्ता का उपयोग कर परिभाषित शैली है:

  .example {width: 50px; }  

और जावास्क्रिप्ट में, मैं उस नियम सेट के लिए चौड़ाई की संपत्ति का मूल्य प्राप्त करना चाहता हूं, उस नियम-सेट का उपयोग करने वाले किसी ठोस तत्व के संदर्भ के बिना। मुझे कुछ चाहिए जो मुझे "उदाहरण" और "चौड़ाई" के इनपुट को "50" या "50px" देना होगा।

सीएसएस नियमों का उपयोग करने के लिए document.styleSheets का उपयोग करने पर इस प्रविष्टि को देखें।

संपादित करें: मैं यहां अन्य लोगों के साथ सहमत हूं, यद्यपि यह एक महत्वपूर्ण आवश्यकता है यदि आपके द्वारा उल्लेख किए गए किसी पुस्तकालय का लाभ उठाने पर आपके पास इसका बहुत आसान समय होगा


.net - how to archive msmq messages? -


I have a bunch of messages in one of the queues from old messages, I want to backup them before purifying them. Any ideas?

Schar

You can take them to a file and return it Can up It can be done with a device (cheap but not free) or write something like this.


casting - c function merge help -


I have two functions:

  zero free_this (this * this) {THIS * This_tmp; While (it_tmp = this) {if (it-> str) is free (this-> str); This is = this_tmp-> next; Free (this_tmp); }} Zero free_ (that * key) {THAT * that_tmp; Whereas (that_tmp = key) {if (that-> id) is free (that-> id); That = that_tmp-> next; Free (that_tmp); }}  

Since they are very similar, I was trying to come to a ceremony to handle both of them. I can already use an indicator as per the correct data (i.e. this structure either for the straight or the ID of that structure) but I can not understand what type of straight worked with Being because I can not just use the zero indicator because there is no member of the name 'next' in the name of zero *.

Any thoughts?

Maybe I should add two strokes to this combination in some way? Here they are:

typingfifth Straight This {Straight * Next; Four * str; } this; Typedef structure that is {struct of * next; Four * id; Unsigned lesser results; The second option; } That;

Can I possibly use the offset function to get the next element?

You can enforce a free function with zero * and field offsets Attested:

  zero-less_Next (zero * or so, size_t other_offset, size_t next_offet) {zero * or_tmp; While (either_tmp = either) {free ((* four *) either + other_offset); Either_tmp = (four *) either + next_offset; Free (either); }} Free_It (this, offsetof (this, str), offsetof (this, next)); Free_either (that is, offsetof (i.e., id), offsetof (next to that));  

You can create macros to replace the old free_this or free_that functions.


nsurlconnection - Populate UITableView with results of webservice -


I have a table view, which I want to populate the results of my call (XML) with a web service .

NSURL Connection / <> and NSMutableURLRequest that are setting up for it are currently in my -viewDidLoad method, and I have Also my data is being backed up in my .m file in my UTTL VIL rep files

and my value is being correctly added to my array (I think) that UITW Any data from the service is being called before the return, which is why My table view is always empty

How can I call methods in the correct order (if this is also a problem) ...

Have you re-arranged the table again, are you reloading on television to call data? You should tell that you have new data.


java - How to do a JUnit assert on a message in a logger -


I have some code-under-test, which calls a Java logger to report its status. In the JUnit test code, I would like to verify that the correct log entry was made in this logger. Some with the following lines:

  Method precedence (Boolean x) {if (x) logger.info ("x happened")} @ test tester () // // perhaps setting up logger first MethodUnderTest (true); AssertXXXXXX (loggedLevel (), Level.INFO); }  

I think this can be done with a specially customized logger (or handler, or format), but I like to reuse a solution already existing I do (And, honestly, it is not clear to me how to obtain logarrecord from logger, but suppose it is possible.)

I also need to do this many times, I have put a small sample below, which you want to adjust to your needs. Actually, you make your own append < / Code> and add the logger you want. If you want to collect everything, the root logger is a good place to start, but you can use more specific if you wish. Do not forget to remove the appenders when you do, otherwise you can also create a memory leak. Below I did this in the test, but can be set up or @ first and tear or @after Better location based on your needs

In addition, the implementation below collects everything in the list in memory if you are logging a lot then you can leave the boring entries or in a temporary file on the disk You can consider adding a filter to the log (sign: logging event is serializable , so you can serial the event object, if your log message is.)

  import org.apache.log4j.AppenderSkeleton; Import org.apache.log4j.Level; Import org.apache.log4j.Logger; Import org.apache.log4j.spi.LoggingEvent; Import org.junit.Test; Import java.util.ArrayList; Import java.util.list; Static org.hamcrest.CoreMatchers.is import; Import static org.junit.assert.assertThat; Public Class MyTest {@Test Public Zero Test () {Final TestAppender Appenders = New Test Adapter (); Last logger logger = logger .getRootLogger (); Logger.addAppender (appender); Try {Logger.getLogger (MyTest.class). Info ("Test"); } Finally {logger.removeAppender}; } Final list & lt; Logging event & gt; Log = apder.getlag (); Last logging event firstLogEntry = log.get (0); AssertThat (firstLogEntry.getLevel (), is (level.info)); AssertThat ((string) firstLogEntry.getMessage (), is ("Test")); AssertThat (firstLogEntry.getLoggerName), is ("MyTest")); }} Class Test Appender Apparel Skeleton {Private Final List & lt; Logging event & gt; Log = new arreelist & lt; Logging event & gt; (); Layout override public boolean () {return false; } @overराइड संरक्षित शून्य अपेंड (last logging event logging event) {log.ed (logging event); } @ Override Public Wide Close () {} Public List & lt; Logging event & gt; GetLog () {new ArrayList & lt; LoggingEvent & gt; (Log); }}  

build process - C++ Buildsystem with ability to compile dependencies beforehand -


I am in the middle of setting up a build environment for a C + + game project. Our main requirement is not just the ability to create our game code, but its dependency (OGrey 3D, CEG, Boost etc.). Apart from this, we also want to develop Linux as well as Windows as our development team includes members using different operating systems.

Ogre3D uses it as a manufacturing tool, that's why we are very far-off on our project at Symeac.

The question is that there is a practical way to set up dependency automatically, after manually installing each dependency manually on the system of the members of all the teams, completely fine Can compile. I know of Maven as a Java developer, but what tools are there in the world of C ++?


Update: Thanks for the good answer and the link in the next few days, I'm trying some tools to meet our requirements starting from the limit. . I really had my share with autotools so far and like I did the documentation (Autobook is a very good read), I'm afraid the autotools are not used on Windows originally.

Some suggested that you allow some IDE to handle dependency management. We are using all potential technologies for purely captured Eclipse CDT or Visual Studio code. This is where the CMAC has allowed to use some flexibility with its ability to create original project files.

The newest module in the newest Limacque 2.8 version is. This allows you to download / checkout code as part of your main build tree, configure and create it. It should also allow the determination of dependency.

At my work (Medical Image Processing Group) we use the SIMKK to create all our libraries and applications. We have a tool to track all dependencies between projects (defined in an XML database). Most third-party libraries (such as Boost, QT, VTK, ITC etc.) we support once for each system (MSWIN 32, MSWin 64, Linux 32 etc.) and are committed as ZIP-files in version control systems. . Seamac can then extract and configure the correct zip file on which the developer is working.


.net - Encrypting Windows Authentication connection strings -


I'm accessing SQL Server database using a Windows Server authentication

  1. Do I need to encrypt the connection string in web.config?
  2. What is the name of the connection string (or database) in case of security? (Like: ApplicationServices ?

I disagree with klausbyskov I will encrypt my connection string even if the name of the server is actually highlighting, but it keeps at least one goal out of it. By encrypting the connection string, that goal will be removed.

Knowing is half the battle.

As far as the connection is the string name, I keep it obscure, The output does not give the name of the database server or anything like that.


mvvm - Managing multiple WPF views in an application -


So I have noticed that a navigation service exists in WPF to maintain a flow through an application. I'm not really in the market for back and forward type functionality, I'm just looking for a good way to switch between views when a button is pressed on a particular scene. I am using MVVM, so I'm not sure if I can give App.xaml.cs a copy of each scene or view modal and switch to a View Model command in App.xaml.cs Call me Maybe I should just handle the click event on the button and taste some of it. Close (); NewWindow.Show ();
With so many things in WPF, this one is not comfortable for me, though there are probably some simple solutions.

Thank you!

I have created a "window loader" class which is the app class immediately when the application starts . The window loader has a dictionary that maintains a union of model model types and looks at types, there is also a way in which the visual model takes a look, depending on the type of visual model the scene solves. , Gives the scene instantaneous, sets the viewcondent of the datacentext into the visual model, so it shows the window loader also registers in the visual model for an event that closes the window Not when it is picked up.

The window loader implements an IWindowLoader interface and a reference to it is kept in each view model (when the window loader instantly provides a visual model for a public IWindowLoader property in the visual model) . Therefore any other visual model can be shown without knowing about any visual model and without showing itself. In addition, window loaders can be fun to test easily.

When I went through the same process, now I have found many examples of this basic basic method. I've just finished rolling out.


html - Set styles per div -


I am new to CSS and not a programmer, I understand what a class is and I think what is a div But what I have not been able to know is to divide styles.

Any help appreciated,

Joost Verplancke

< P> In your HTML

  & lt; Div class = "MyClass" & gt; see me! & Lt; / Div & gt;  

In your CSS

  .myclass {background-color: # aaa; }   

Edit

As told by Dave, you can provide multiple classes for one element. This means that you can essentially make modular styles

for example, in your HTML

   

In your CSS

  .myclass {background-color: # aaa; Color: # 1dd; }. MyColor {color: # 111; }  

You should also note that the order attribute in the class attribute has conflicting settings in different styles. That is, class = "myClass myColor" is exactly the same as class = "mycolor myClass" . Which contradictory setting is actually used in CSS.

This means, instead of forming myClass from color in the above example, colors to myColor , you have to change your CSS to switch around it

  .mycolor {color: # 111; }. MyClass {background-color: #by; Color: # 1dd; }  

html - # character in path of javascript reference -


I have a web page that drags into several javascript files in the head section. The path is dynamically generated to one of those files, and I see a problem with some paths, which includes # characters For example, the following path does not resolve correctly, and therefore. The js file is not loaded (even if I have verified that it exists):

   

I am wondering what is the special meaning of '# 3' in this situation. I have tried changing the # character to the equivalent html unit, such as:

   

But this does not solve the problem. Besides, I have seen that the following path does resolve correctly (assuming the file):

  & lt; Script src = "\\ remote_machine \ share \ test \ this # test \ test.js" & gt; & Lt; / Script & gt;  

What is the meaning of '# 3' in the context of html as described? What is the recommended fix?

Edit: I have tried to replace "%" instead of '#' in the three examples above, the first two are broken, and the third does not work anymore. If I change all the places with 20% addition, then I get the same result.

In addition, hash and spaces (which respectively % 23 And should be encoded as % 20 ), you have also received a backslash. There are no directory separators in backslash URLs. A URL is not the same as a filename, and what you have found here is a file Not the name, it is a UNC path to the local area's Windows networking.

There is no standard way to embed a UNC path in the urc; Windows Networking has no place on the Web and you should not include references to resources on the Windows network in any Web page. If you want try:

  file: 

// remote_machine / share / test / this% 20is% 20% 23% 20test / Test.js # works on IE, chrome, opera file: ///// remote_matchin / share / trial / this% 20is% 20% 23%


c# - Best way to call back/noftify parent page of an event? -


In a Silverlight 3.0 app, there is a shell page that acts as a navigation piece for many baby controls and other Silverlight Does the pages have The Frame page contains the Silverlight page in the Shell Page. The I pages are dynamically rotated through the code-back file, so xaml has no direct reference for them.

How can call these dynamically-linked pages back to Shell Page? We are currently using events to communicate with the included user controls, but these are known events that we can subscribe to xaml ... then if you are suggesting events please include a solid example .

TIA

If you are controlling each child from the parent page, then you have to complete the rep Can be used. Very common example:

  public representative zero function delegate (string child control_name);  

In the parent container class:

  public functionDelaget eventfunction;  

In the original container manufacturer:

  EventFunc = DoSomeAction;  

Funnel the event on the child object and call when appropriate.


C++ -- Pointers to Arrays -- Arrays of Pointers -


I have noticed that it has created confusion for many people, but here are some steps to read and read cplusplus tutorials. After my brain was still fried

Suppose I have the following variables in the header file -

  Int number of offline points; D3DXVECTOR3 * line; // This is confused as to  

, then in the implementation C ++ file I initialize it as the following -

  / / Started in both constructor numbersOffline pin = 25; Line = new D3DXVECTOR3 [numpoint]; // array of indicators?  

How does my line variable now show?

As far as I can read from the links on staxahovarflow, I can indicate that it should represent an array. I then read the following ...

(1)

... where (a) the arrows of pointers , And (b) Pointer to Arrays both discuss. It has left me confused once again because they both work the same way.

The fact is that I define my pointers in a different place where I allocate (right?) They think where my confusion is from What do I do right Is this an array of pointers for D3VTttR3 objects?

to finish - If there is information about a line segment in the variable line, then am I making an array of line segments? I currently have the following -

  // header file int numberoffline section; D3DXVECTOR3 ** Line Collection; // Pointer array - each of which points for // pointers array? // CPP file numberoffline class = 8; // For constructor (i = 0; i & lt; numerally offline class; i ++) // initialization {// and allocation is correct? Lineclass [i] = new D3xxactor * [nm points]; / / Y / N} // Memory collection for line collection (zero) start line partitions (startpoint, endpoints) // instead of generating a line segment {// can return proxy array! = Numberoffline points line [sent ++] = interpolate (start page, end point, time-takt)) // to generate an array of pseudo line lines! = Numberoffline line demographics [posted ++] = line}  

Any help is highly appreciated.

  int numberoffline points; D3DXVECTOR3 * line; // Confused as to what it is // the initial line in both constructor numbers = 2; Line = new D3DXVECTOR3 [numpoint]; // array of indicators?  

line is an array D3DXVECTOR3 . This will be an array of indicators if D3DVECTOR3 is itself an indicator, though. Since I do not know C + + D header very well, I'm not sure.

  D3dAquactor 3 ** Line Collection;  

There is an array of indicators, each indicator is likely to be an indicator in a line (i.e., an array of D3DXVECTOR3 ).

You have to have two options, randomly, to set each entry on the same line in the lineCollection . It is safe if you know that the lines do not change Going (and can not be freed), or if they change, you want to see the changes inside your collection.

The second option will be to create a new array for each entry in the lineCollection , and copy the copies to each new array from each line .

There is no correct answer, it depends on your desired functionality.


coldfusion - Session Variables, welcome messages -


Why does not this work? My welcome message, it just does not appear:

  & lt; P & gt; Welcome & lt; Cfoutput & gt; # Recordset1.UserID # & lt; / Cfoutput & gt; & Lt; / P & gt;  

Session variables on the login page I created:

  & lt; Cflock timeout = 999 scope = "session" type = "special" & gt; & Lt; Cfset session .IDUsers = '' & gt; & Lt; / Cflock & gt;  

Is this wrong? On the index page, where I am trying to display my welcome message, I have:

  & lt; Cfquery name = "Recordset1" data source = "cafegosip" & gt; Select from users * where the user IDUsers = & lt; Cfqueryparam value = "# session. Idzer #" & gt; & Lt; / Cfquery & gt;  

I'm not sure whether it works, or is it necessary?

If you set the userid stored in the session to be an empty string, when you query it on it , You will only receive users for whom ID is an empty string, none of them should be. Therefore, the query is returning the blank set, and your page is not displaying the (right) User ID.

How are you starting to identify the user? Do they ask during a database when they log in? Are you collecting cookies? Reading tarot cards? To work for it, at some point, you have to store the correct user id, maybe in session. To do this, you must first know who the user is.

In addition, if you are using CF6 +, you probably do not need cflock. It is now used to prevent running conditions, as CF is now thread-protected.


.net - pdf resize in browser before opening -


  उत्तर। कॉन्टैक्ट टाइप = "एप्लिकेशन / पीडीएफ"; स्ट्रिंग FilePath = Server.MapPath ("reliance.pdf"); Response.WriteFile (FilePath); Response.End ();  

ब्राउज़र में खुले होने से पहले हम पीडीएफ फाइल का आकार बदल सकते हैं .... क्या आप मुझे बता सकते हैं? धन्यवाद

इस पर एक नज़र डालें, आप कुछ मापदंडों के साथ बहुत कुछ अनुकूलित कर सकते हैं:

< P>


python - Good way to pass variables for common elements to Mako templates? -


I am using Maco's legacy features, such as "Top. In Mac, general page elements such as a header and footer Detecting "template page-specific controllers use their own template, which is the base.

base.mako requires a set of variables - for example, the name of the logged-in user goes to the header for all the pages. However, this is a separate page controller that selects and presents a template, and is therefore responsible for passing the variable to do it

I do not want to know all those page controllers What is the basis template in their context?

Thank you in advance!

Common features can be controlled in two ways.

  • Inheritance All page administrators are sub-classes of a common class that gives general properties.

  • Delegation All page controllers are part of a pipeline, where additional information is some normal procedure (before or after the page controller) times.

You have to choose one.


C# Remote Method Invocation (RMI) -


I need to write an RMI server and client in C # and it's confused about it actually Considering most of the posts I have read online on this topic is Java-related Java version of RMI C # What exactly is that? thank you in advanced!

Looking for you, you might want to look in it as well.


how to reduce the size of listview width using xml in android? -


कैसे एंड्रॉइड में xml का उपयोग करके listview चौड़ाई के आकार को कम करें < / Div>

संभवतया, आप android: layout_width पैरामीटर को संपादित करेंगे ... वहाँ कुछ है जो मैं ' उदाहरण के लिए, यह सूची दृश्य 200 डुबकी चौड़ी तक सीमित है:

  & lt; ListView एंड्रॉइड: id = "@ android: id / list" android: layout_height = "Fill_parent" एंड्रॉइड: layout_width = "200dip" / & gt;  

c - how do I test the format of a string? -


I have trouble matching the format of a string, the format is .rt timing which is "00:00: 01,000 -> 00: 00: 04,000 ", Hour, Minute, Seconds, Million Seconds

How do I match it to string? Here I am trying to add or subtract the time.

To calculate the values ​​of time, you want to convert string representation to integer values.

You can use numbers to read numbers from formatted strings, then multiply them together to get a millisecond value. sscanf returns the number of matches to succeed, so if the integer value less than the number of fields you expected to match is low, then you know that the string does not match your input format .


php - searching content of mysql fields -


मेरे पास एक मेज सेटअप निम्न तरीके से है

  `id` int (11) नहीं NULL AUTO_INCREMENT, `eventid` int (11) नहीं है,` आमंत्रित 'पाठ COLLATE utf8_unicode_ci नहीं, प्राथमिक कुंजी (`आईडी`)  

उस तालिका में मेरे पास पंक्तियाँ हैं जो इस तरह दिखती हैं

  1, 127, 32215, 55648, 89887, 55555, 66666, 33333 '2, 168,' 44444, 33333, 121212, 0540541 ' 

मैं किसी विशिष्ट संख्या के लिए एक मैच के लिए आमंत्रित फ़ील्ड के contnts खोज कैसे करूंगा, जैसे कि मैं 33333 की खोज करना चाहता हूं, यह दोनों पंक्तियाँ वापस करेगा, लेकिन यदि मैं 44444 के लिए खोज की है, यह केवल दूसरी वापसी करेगा?

मेरा मानना ​​है कि उपयोग कर सकते हैं, तो ऐसा कुछ:

  चुनें * से tablename जहां find_in_set ('44444', निमंत्रण);  

यह हालांकि बहुत अच्छा डेटाबेस डिजाइन नहीं है।


javascript - Shadowbox troubleshooting -


Hey guys, I'm trying to work whenever I click on the link, it's just a new page The film opens. The head tags have the code:

  & lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery-latest.pack.js" & gt; & Lt; / Script & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "shadowbox.css" & gt; & Lt; Script type = "text / javascript" & gt; Shadowbox.init ({player: ["qt"];}); & Lt; / Script & gt;  

And here is the code in body section:

   

Does anyone see any problem?

It looks like you are missing the actual Shadowbox.js file below your shadowbox.css link def Try adding:

  



        

I have a config file in the root directory of my project that has a specific stable environment range. Something for the effect of how to set the current directory as a root variant:

  class conference {const root = dirname (__ file__); }  

This is not possible because it is a continuous expression I have also tried to change it on every example deal:

  class conference {const root = '/ Old / path'; Public function __ composition () {$ this- & gt; Root = '/ new / path'; Copy $ this-> Root; }} $ Config = new Config;  

It seems to work, but for this it is necessary to pass approximately $ config between all my classes Did anyone get a hack around this?

(Besides, I am not yet on php5.3, so __DIR __ will not work).

Make this a stable work that has been started on the first call:

  class Conf {static protected $ _root = null; Static public function root () (if_null (self :: $ _ root)) self: $ _ root = dirname (__ FILE__); return self: $ _ root;}}  
< P> This allows you to set a root in-class and protects the values ​​of the root from overwrite.


.net - How do I create a binding that involves some sort of formula? -


For example, if I have an element whose size I want to double the size of another element, how do I get it? this?

An example would be the following, mirroredObject is the object I want to give half of its width to the breadth of the border object.

& lt; Boundary width = "{binding real-world, elementname = mirrored object, mode = default}" />

I have other conditions, where I would like to bind the property, it can be the sum of the width of other elements, how do I get it?

solution

Please see my answer to the solution which was received from the answer of lenanovd.

You can use binding converter which convert to another int using your formula . Please refer to the article for examples of binding converter.

Hope it helps.


silverlight - ScaleTransform applied to elements in stackpanel causes "white" space -


When I add UserControls, in which the scale transforms apply to the stappapel, I think the extra space between the controls It is as if the transformation was not implemented. What I think, a result does not actually change the width / height of any control, but rather changes the width / height of the render. If this is the case, how can I show the control without extra space?

Here's an example. The first line shows how my controls look like without any changes apply the second row is what they look like ScaleTransform {ScaleX = .75, ScaleY = .75}. I want the elements to collide like the first line.

alt text

Look at the class in the Silverlight Toolkit.


PHP FILE HANDLING ERROR - Unable to figure out -


  फ़ंक्शन Random_N () {$ RandomNumber = mt_rand (1, 99 99); वापसी 'temp_file / $ RandomNumber.html'; } वैश्विक $ file_name; $ File_name = Random_N (); $ File = fopen ($ file_name, 'w +'); $ पाठ = $ msg1; फ़िलिट ($ फ़ाइल, $ पाठ); $ _SESSION [ 'शरीर'] = $ msg1; $ _SESSION [ 'file_name1'] = $ file_name;  

ठीक है, शुरुआत के लिए - समस्या के बारे में कुछ स्पष्टीकरण बहुत सराहना की जाती है। आप पाएंगे कि आपको बहुत अधिक सहायता मिलेगी अगर सिर्फ आपके कोड को पढ़ने की उम्मीद न करें और स्वयं का निर्धारण करें कि आप क्या करने का प्रयास कर रहे हैं।

अपने कोड में, यह पंक्ति: $ Text = $ msg1 आपकी समस्या का एक स्रोत हो सकता है $ msg1 से आया था?

Random_N फ़ंक्शन में, यह हमेशा स्ट्रिंग 'temp_file / $ RandomNumber.html' क्योंकि यह सिंगल कोट्स में संलग्न है या तो दोहरे उद्धरण चिह्नों में बदलाव करें, या अधिमानतः, कुछ समालोचना का उपयोग करें:

  वापसी 'temp_file /' $ RandomNumber '.html';  

model view controller - PHP: How to add Languages layer to MVC framework? -


I am currently working on my own implementation of an MVC framework. I would like to know how to add language layers to my framework so that it can support many languages ​​other than English. What is the role of Unicode in this case?

Frequently "localization files" (PO files as standard for translation of UI) < / P>

"Hello" echo

you want to

< P> echo MyFramework :: Translation ("Hello")

This translation () function is just right. PO file appears, and "id" returns the desired localized text


Excel VBA code to SaveAs a specific filename and close the active workbook -


To save the active workbook as "finaloutput.xls", what do I need to add to the end of the existing subtype And then automatically closes the workbook without saving the changes?

You can use some such simplicity, which I have to activate the workbook to save the workbook After that put in another workbook and executed with the tool ... Macro Menu (Alt + F8).

  Public Sub SaveAsAndClose () ActiveWorkbook.SaveAs "finaloutput.xls" ActiveWorkbook.Close end sub  

php - How to prevent access of admin pages by knowing the admin page url? -


If an administrator knows the URL of the page such as www.example.com/admin.php, they will be easily accessible

You never have administrator section public You should not trust the ambiguity for this, the authority is the way to go, you can do it by trusting .htacces, or PHP . A crude example is below.

Below is a simple login implementation if the password is correct then it will allow the user to go to admin.php. Although you should read on sessions, because entry headers should be present on every page behind the login page. Password handling can be handled more securely.

  & lt ;? Php session_name ('MyAdminSession'); Session_start (); If (isset ($ _ POST ['userid']) and release ($ _ POST ['password'])) {$ userid = $ _POST ['userid']; $ Password = MD5 ($ _ POST ['password']); If ($ userid == 'myusername' & amp; $ password == MD5 ('mypassword')) {$ _SESSION ['logged_in'] = true; Header ('location: admin.php'); Go out; }}? & Gt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Strongly //n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "nl" & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" /> & Lt; Title & gt; My login page & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form action = "index.php" method = "post" & gt; & Lt; Label = "userid" for & gt; Username: & lt; / Label & gt; & Lt; Br / & gt; & Lt; Input name = "userid" type = "text" id = "userid" /> & Lt; Br / & gt; & Lt; Label = "password" & gt; Password: & lt; / Label & gt; & Lt; Br / & gt; & Lt; Input name = "password" type = "password" id = "password" /> & Lt; Br / & gt; & Lt; P & gt; & Lt; Input type = "submit" name = "submit" class = "button" value = "login" /> gt; & Lt; / P & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

select - jQuery use change event on input text -


Some drop down lists on my project have so many options that I have them in an input texts with an autocomplete function Changing Jquery autocomplete plugin).

However, in drop down lists I can use a change event and for example, I can use its value to fire an Ajax function. But, with an automatic completion, I do not know how to do this and I want to keep the change event. When I use the event of change, nothing happens, or just works and there is some value on the input text and you erase its text and blur. Summary: I want to use a change event on auto-complete input text. .

If I understand your problem properly, then you The event can be used to fire a function all the time and it is released in the input field.


flash - artificial slowdown -


I have a flash clip that is known to behave strangely if the user is slow Internet Now I want to redress it. I am Is there any way to slow down load speed? Preferably with local Apache or with Firefox only.

If the problem is about loading the fixed file, do not load dynamically-generated XML etc. Doing etc.) You can try the download simulation feature created in Flash IDE. Start by testing the movie (Control + Ant), then use the View menu to enable and configure the simulation.


c# - P/Invoke throw System.ExecutionEngineException -


I have a closed source coded in C ++, which I wanted to use in the C # solution, Managed DLL created using P / AWA to call closed source DLL function. It works very well for any ultimate function and variable variables although I get a system. Execution Engine Exceptions When Runs More Complex Functions That Takes an Array of the Composition There are four arrays for the wire. Here's what I have:

  [Structure layout (layout kick.security)] Public structure target {public perfection target; Public string label; } [DllImport ("tyrfde.dll", EntryPoint = "TrafficGet target")] Public stable extern int GetTarget (referee target [] goal);  

The information below is from the helit file DLL:

  #define TARGET_LBL_SIZE (256l) typedef struct _tyrfdeTarget {TInt32 TargetID; // Integer signed 32bits TCharA label [TARGET_LBL_SIZE]; // carat} tyrfdeTarget; TInt32 __stdcall tyrfdeGetTargets (tyrfdeTarget * pTargets);  

Not sure exactly why the size of the array is long, but SizeConst only int. After some searching I am trying to fix it.

But I still have problems I have read that if the work of memory used by CLR is clear, then it throws an exception. Unfortunately I can not verify this. Is there anything in my code that is clearly wrong and can cause problems?

Hm, I think your problem riff target [] target parameter AFAIR is a reference to this one reference, which is probably not what you really want.

I will try:

  [DllImport ("tyrfde.dll" EntryPoint = "tyrfdeGetTargets")] Public stable extern int GetTarget ([Out, Marshall AS (UnmanagedType .LPArray)] goal [] goal);  

Maybe it helps in making the right announcement.

Note that the size of the array is not clear here, usually in such a case a referee int length parameter, which is martialas in the attribute SizeParameterIndex can be referred to in property.


java - When to use intern() on String literals -


मुझे इस तरह बहुत सारे विरासत कोड दिखाई देता है:

  class A {public static final स्ट्रिंग कॉन्स्टेंट = "मान"। अंतराल (); ...}  

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

यह सुनिश्चित करने के लिए एक तकनीक है कि CONSTANT वास्तव में एक स्थिर नहीं है।

जब जावा कंपाइलर अंतिम स्थैतिक आदिम या स्ट्रिंग के संदर्भ को देखता है, तो उस क्लास में उस निरंतर के वास्तविक मान को सम्मिलित करता है यह। यदि आप फिर परिभाषित वर्ग में निरंतर मान बदलते हैं लेकिन उपयोग की जाने वाली क्लाइंट को पुनः कंपाइल नहीं करते, तो यह पुराने मान का उपयोग जारी रखेगा।

"निरंतर" स्ट्रिंग पर इन्टर () को कॉल करके, यह है अब कंपाइलर द्वारा स्थिर स्थिर नहीं माना जाता है, इसलिए उपयोग करने वाले क्लास वास्तव में प्रत्येक उपयोग पर परिभाषित वर्ग के सदस्य का उपयोग करेंगे।


JLS उद्धरण:

  • < P> एक संकलन-समय स्थिरता की परिभाषा:

  • एक संकलन-समय स्थिरता (पृष्ठ के बारे में आधे रास्ते के बारे में) के परिवर्तनों का अर्थ:

  • < / Ul>

javascript - Add ng-click to highcharts-ng column chart xAxis labels -


I am using highchart-ng within an angular app, let me run a function after viewing the xx label below The categories and labels I am adding to charts are required.

Currently, I can add an onclick to the label and alert, but it is not able to work with angular.

  return "& lt; one onclick = 'warning (1)' & gt;" + This.value + "& lt; / a & gt;";  

An example of the current code is working here.

Until the $ compilation is called, the angular instructions are not processed, which are usually But then it is done when angular inserted templates are for example instructions and ng-if you modify yourself to doom, then angular does not know much with HTML, unless you do not compile $ yourself DOM After being revised by the High Charch-NG, you get $ Ideally you want the element one element to be computed:

  $ compilation (element) (scope)  

If I have not been compiled in advance (I am unsure what happens if it is not) and Scope Moving the top of the DOM tree in the first radius, if the scope of the scope is required If not, you can attach the element to just $ Root Scope.

If you have to compose $ compile (as well as $ Rootscope if you describe it) for more information, see this, which also tells you the strange syntax of the $ combible expression. If I post the code, I can tell you where the $ compile statement is located and how to find the appropriate area to use.

EDIT: One here is working JSFiddle:


Gnu linker - output section type -


As far as I know and I have read in the Linker document, there are 5 output block types: NOLOAD , DSECT, transcript, information, overlay but only 2 of them are explained: NOLOAD and overlay. Copy , INFO and DSETT have not been explained and everywhere in the Internet, I have explained the same word without 2 and can see 3. Anyone would be very kind to explain whether the DSECT , COPY and INFO actually changes about the output section?

from official GNU Link documentation (found easily with info ld ):

  DSCTP Copy Info Overlay These type names are supported for backward compatibility, and rarely used. They all have the same effect: the section should be marked as not allocated so that no memory is allocated for the section when the program is run  

REST API design agregate -


If we are creating APIs on employee management ap then there is a schedule in the interface, where we will be in the table for every user in line All changes have to be shown forward, there is a summary for each user (per line) and day (per column). Do we have a large gross call like:

  received / api / locations / {id} / shedule  

return all employees, changes, summaries Will give etc. Or perhaps we should break several collections such as:

  received / api / locations / {id} / files / api / locations / {id} / events gET / api / locations / {id} / Summary GET / API / Employee / {ID} / Summary? Date_from = {date_from} and date_from = {date_to}  

For me, the second option is more flexible and there is no reason to create a new abstract resource, which is scheduled in my opinion Is part of the interface layer and should not have any effect on the API design.

On the other hand, the larger gathering is more optimal, because there will be less database database and easier in cache. / P>

How do you feel? Is there a source, the type of article that I can trust?

There is nothing or either calm or unaware about the approach. URI semantic is irrelevant to REST. What really matters is that how do customers receive URIs if they are looking at URI patterns in documents and APIs are not cool to fill the price instead of using the links.

With that in mind, I would say that the approach that is more relevant to your business is the best ecosystem of your applications. If you feel the need, do not be afraid to make gross resources.


freeglut - Why is Visual Studio Trying to Link 'freeglutd.lib'? -


I am trying to compile an OpenGL program using Visual Studio 2013, but I get the following error:

Blockquote>

Error 1 error LNK1104: File not open 'freeglutd.lib' ...

For reference, I have FreeGLUT installed and VS Include files and library files that can be configured to search the correct directory; Actually, VS Includes glutat, in which the files are fine. I've added opengl32.lib and freeglut.lib to additional dependency .

Why is VS looking for 'freeglutd.lib'? This is definitely not listed in additional dependencies. I can solve the compilation error by relocating 'libglut.lib' to 'libglutd.lib' from dependency and prior removal, but I'm just curious because it is this way Is behaving.

Speaking of additional dependencies, Opengl32.lib is actually adding essential? I can compile my (very basic) program without it, but more than one person has said that possibly, for older versions of Visual Studio?

Two things can be examined for this too:

  • Are you making debug or in release mode? At the end of Freeglutd.lib, D suggests that this is a library for debug builds
  • Try to create a new project from scratch, enter some basic runnable code in it, Which is free glute and see that VS is linking properly. It will also confirm that for some reason the project file of the previous project was corrupted (@Robert Harvey has been suggested) or the problem is somewhere

replace - Replacing more than one line in the console in python -


I am writing a program in Python and I want to replace more than one line in the console with the new text. For example, if I have 3 sentences printed in the console:

  print ("Hello World!") Print ("How are you!") Print (" What's happening? ")  

Where each is on a separate row (and it is such as \ n )

How do I change this text when it is displayed in the console? I can not do \ r in this situation due to \ n .

An easy fix would be to simply change the end separator for printing your wire. You can specify that you print the print function end argument

  print ("Hello world!", End = "") print ("\" Rhello world again ! ")  

In this case, we are setting the separator to" "which is nothing, so printing the next strings starts on the same line, thus \ R can be used. On a line.


url - How do i do the following curl command in Java -


Text after "

How do I apply the following curl command in Java URLConnection

  Curl -X put \ h "X-parse-application-number:" \ h "x-parse-rest-api key:" \ h "content type: application / json" \ -d '{"score": 73,453}'  < / Pre> 

thanks in advance

using the derived square of which do you do it easily You can.

  URL myURL = new URL (serviceURL); HttpURL connection myURLConnection = (HttpURLConnection) myURL.openConnection (); MyURLConnection.setRequestMethod ("put"); MyURLConnection.setRequestProperty ("X-parse-application-id", ""); MyURLConnection.setRequestProperty ("X-parse-rest-API-key", ""); MyURLConnection.setRequestProperty ("content-type", "app / json"); MyURLConnection.setUseCaches (wrong); MyURLConnection.setDoInput (true); MyURLConnection.setDoOutput (right); MyURLConnection.connect (); JSONObject jsonParam = new JSONObject (); Jason Parm ("Score", "73453"); OutputStream OS = myURLConnection.getOutputStream (); Os.write (URlencoder.encode (jsonParam.toString (), "UTF-8")); Os.close (); For the   

curl -x received \ "x-parse-application-number:" \ h "x-parse-rest-api key:" \ g \ - Data-urlencode 'contains = game

  string charset = "UTF-8"; String query = String.Format ("include =% s", URLEncoder.encode ("game", charset)); URL myURL = new URL (serviceURL + "?" + Query); HttpURL connection myURLConnection = (HttpURLConnection) myURL.openConnection (); MyURLConnection.setRequestMethod ("GET"); MyURLConnection.setRequestProperty ("X-parse-application-id", ""); MyURLConnection.setRequestProperty ("X-parse-rest-API-key", ""); MyURLConnection.setUseCaches (wrong); MyURLConnection.setDoInput (true); MyURLConnection.setDoOutput (right); MyURLConnection.connect ();  

r - Get substring location within a given string -


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

  • 4 जवाब

स्ट्रिंग पर विचार करें:

  a & lt; - "यह एक स्ट्रिंग है"  

अब, grep का इस्तेमाल सबस्ट्रिंग की उपस्थिति की पुष्टि के लिए किया जा सकता है: < / P>

  grep ("t", a) grep ("this", a)  

लेकिन स्थान देना नहीं लगता है।

क्या कोई फ़ंक्शन है जो मुझे किसी भी उपस्ट्रिंग का स्थान देगा?

  getLoction (a, "t") ## 1 12 मिलना (एक, "यह") ## 1  

यहाँ तुम जाओ, मैं stringr पैकेज के लिए आंशिक हूँ:

  लाइब्रेरी (स्ट्रिंगर) a & lt; - "यह है एक स्ट्रिंग "str_locate (a," t ") str_locate (a," यह ") str_locate_all (a," t ")  

और आउटपुट:

 < कोड> & gt; Str_locate (a, "t") आरंभ अंत [1,] 1 1 & gt; Str_locate (a, "यह") प्रारंभ अंत [1,] 1 4 & gt; Str_locate_all (a, "t") [[1]] शुरू [1, 1] 1 1 [2,] 12 12  

c++ - Boost test: #include <boost/test/unit_test.hpp> not found. How to link, config on MAC -


I'm new to promoting the library. I have been promoted by the MacPortes first, and I can locally search for /usr/local/boost_1_57_0/boost/test/unit_test.hpp

then I have an open source Finding and downloading the zip folder URL is here: https://github.com/jsankey/boost.test-examples

Then I have a CD in that download directory And as the make , README said, but it has thrown an error:

  c ++ - main.cpp -lboost_unit_test_framework main.cpp: 3: 10: Fatal Error: 'boost / test / unit_test H Include Not Found # Eepi 'file & lt; Boost / test / unit_test.hpp & gt; ^ 1 error occurred. Make: *** [main] error 1  

Then I just created a hello.cpp file

  g ++ -o hello -lboost_unit_test_framework Ppp  

Yet threw this error:

  Hello. Cpp: 3: 10: Fatal error: 'boost / Test / unit_test.hpp 'file not found # include & lt; Boost / test / unit_test.hpp & gt; ^ 1 error occurred.  

Here is a basic test case of hello.cpp:

  #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE Hello #include & lt; Boost / test / unit_test HPP & gt; Int add (int i, int j) {return i + j; } BOOST_AUTO_TEST_CASE (Cosmic Inorder) {BOOST_CHECK (plus (2, 2) == 5); }  

The existing Makefile is:

  TARGETS = The main suite of fixtures claims: $ (target) exam: $ (goal) $ (adapter) Run -, $ (TARGETS)%:% .cpp $ (CSE) -o $ @ $ ^ -lboost_unit_test_framework run -%:% -. / $ ^ - output_format = xml --log_level = test_suite & gt; $ (^) - report.xml Clear: rm $ (TARGETS) * -report.xml  

Where was I wrong, or what was I supposed to do to compile it? Thanks a lot.

Edit: I received the g ++ -i / usr / local / boost_1_57_0 -i / opt / local / include -l / opt / local / lib hello.cpp-o hello -lboost_unit_test_framework < / Code is used> then it is complaining : ld: -lboost_unit_test_framework does not find the library for blur: error: linker failed with failure failure code 1 (invitations to view -V Use).

I tried downloading boost_unit_test_framework but did not find a source.


django - Backbone.js appending [] to key name on fetch -


I'm working on a Django + BackboneJS application.

The following steps have been fetched on my collection on a given flow of my flow:

  loadAdsByPlace: function (filter, placeID, place_chill_list, page, success_funk) {var Self = this; Var data = {Page: Page, PlaceID: PlaceID, Place Chilled ID: Place Chilled ID List}; Data ["room"] = this.buildRooms filter (filter); Data ["bathroom"] = this.buildBathroomsFilter (filter); Var fetchOptions = {Data: Data, Reset: Incorrect, Delete: Incorrect, Success: success_func, Error: success_func}; This.fetch (fetchOptions); },  

The request is successfully hiting my thoughts, I can see the printing request. GET to console, but what I'm getting is:

  & lt; QueryDict: {u'rooms': [u'5 '], you' place id ': [u'538a8cd7beac9e1a33977449'], you 'ChildIdlist []': [u'525464 ', u'526706'], U 'Page': [u'1 ']} & gt;  

The problem is returning:

  u'placeChildIDList [] ': [u'525464', u'526706 ']  < / Ex> 

While I expect

  u'placeChildIDList ': [u'525464', u'526706 ']  

can not be found reason. Anyone can help

traditional option to true < / Code> While fetching.

  var fetchOptions = {data: data, reset: wrong, delete: wrong, success: success_func, error: success_func, traditional: true}; This.fetch (fetchOptions);  

Aurelia - accessing shared ValueConverter from a view -


If I have a value converter 'XyzValueConverter' class from the 'xvc.js' file in the 'root' directory in 'toView' (value);

The answer is to import the converter like a custom element in the answer.

At the top of the View Template

  & lt; Template & gt; & Lt; Import = 'xvc' from & gt; & Lt; / Import & gt; ... & lt; P & gt; $ {SomeValue | | Xyz} & lt; / P & gt; ....  

sprite kit - SpriteKit SKTexture.preloadTextures high memory usage Swift -


I have STKActual with about 90 png images. Each image has a resolution of 2000 x 70 pixels and has a size of ~ 1kb.

Now I have inserted this image from the Errata in an array like this:

  Var dropBarAtlas = SKTtextureAtlas (named: "DropBar") for 0 . In & lt; DropBarAtlas.textureNames count {var textuteName = NSString (format: "dropbar% i", i) var texture = drop bartattles.txtname (textuteName) dropFrames .addObject (texture)}  

TheMoveToView preloaded the array with texture in the text:

  SKTtexture.preloadTextures (dropFrames, withCompletionHandler: {() -  

Animation 30 fps to play with. I use animate with texture.

  var Chetanopropbar = SKAction My problem is that when I preload texture So, memory usage is increased to about 300 MB. Is there another performant solution? 
and what frame rate and image size are recommended for SKAction.animateWithTextures?

< P>

You should keep in mind that the size of the image file (1 KB in your example) is stored in the RAM to store the required memory There is nothing with the quantity of. You can calculate the amount of memory required with this formula Can:

width x height x byte per pixel = size in memory

If you use the standard RGBA8888 pixel format, that means that your image is almost in RAM memory 0.5 megabytes is required, because RGBA uses 8888 4 pixels per pixels - 1 byte for each red, green, blue color and 1 byte for alpha transparency. You can read more.

So what you can do, you have to customize the texture and use different textual formats. Here is another example about the texture.