Monday 15 September 2014

Fluent NHibernate - unit-testing a one-to-many *inverse* mapping -


I do not understand how Fluent NHibernate PersistenceSpecification & lt; To use T & gt (or if this is possible);

One-to-many mapping

method to check a inversion (...) method . Trying to:

Using a fluent Neighbnernet on the example of a vanilla blog / post, I have blogs from one to several blogs & lt; -> Post Mapping is defined. I want one restriction that a post should always be consistent with the blog, from exactly the same time it is added to the database. (Basically, the blog id column in the postal table is not zero).

For this reason, I defined mapping as:

  Public class blogmap: classplapse  

In the blog class, there is a AddPosts (IELIT & Lt; Post & gt; Position) method that takes care of both sides of the mapping, so when the post Insert instances

So far, it's great.

While using the problem

  new compulsion exclusivity & lt; Blog & gt; (GetSession (), eq). Checklist (C => c.Posts, new [] {new post} {name = "post1"}, new post {name = "post2"}}). Verify mailing (); In the mapping unit-test, I get this exception:  

"System. Exception: Actual calculation is not equal to expected count"

... which is expected, Since the blog id values ​​of the posts are not set anywhere, I am thinking that in some way I can get behind the scenes by blog for example strongly clarity Checking I can call the AddBlogs (...) method manually Is.

If I delete . The mapping () and (to remove the obstacles to tap the databases for blog ID column) exams are passed.

Any thoughts?

I know that it has already been sorted on the mailing list but we are also on stack overflow Can answer.

Intolerance is a checklist method in the display class. Here's an example used:

  _spec.CheckList (x => x.EnumerableOfKittens, kittens, (cat , Kitten) => cat.AddKitten (Kitten));  

This method was only recently added if you have not received it, so get the latest FNH trunk.


c# - int array to string -


In C #, I have an array of ints that contain only digits, I want to convert this array to a string .

Array's example:

  int [] arr = {0,1,2,3,0,1};  

How can I convert it to formatted string: "012301"?

at.net 3.5 Usage:

  string .join (" ", New list & lt; int & gt; (array). ConvertAll (i = & gt; i.ToString ()) toArray ()).  

Use of at.net 4.0 or above: (see Jane Rimunda's answer)

  string result = string .join ("", Array);  

asp.net - How to verify 301 redirect -


After adding a redirect to the IIS, except for setting something like a fieldal on my server, there is a log or something else

Telephone type 80 on your server type as follows:

  Get /your.url http / 1.1 Host: your.hostname.here  

Follow it with two empty rows, and you should see the response in your telnet window if the first of the feedback header Something looks like row HTTP / 1.x 301 , then its functions.

Edit: Of course, no one really should use Telnet now when we have the tools available.


android - How can I launch an activity in another apk? -


Hi,

I have 2 projects (each has its own APK) Would you please tell me Can I launch what activity which I have made in the second APK? I have this activity that I want to launch from any other project: // What should I do here so that I can launch it in a different project?

You must apply an intent interface ie Your activities have been answered in the specific intents specified by intent-filters in your manifest. Take a look at this page:


objective c - Get the current first responder without using a private API -


I submitted my app to a small one week ago and today I got a lousy rejection email that tells me that my The app can not be accepted because I am using a non-public API; Specifically, it says,

The non-public API that is included in your application is the first prepaid.

Now, the abusive API call is actually a solution I found here:

  UIWindow * keyWindow = [[UIApplication shared application] keyWindow ]; UIView * firstResponder = [keyWindow Display Selector: @Selector (First Responder)];  

How do I get the current first responder on screen? I'm looking for a way out of my app that will not reject my app.

In my application, I often want to first reply that if the user moves on the background, For I wrote a category on UIView, which I call on UI window.

is based on the following and should be responded first.

  @implementation UIView (FindFirstResponder) - (ID) Find FirstResponder {if (self.isFirstResponder) {Return Self; } (For self.subviews in UIView * subView) {ID responder = [subView findFirstResponder]; If (Respondents) Respondents of Return; } Return zero; } @end  

iOS 7 +

  - (ID) FindFirstSponder {if (Selffisher Repotter) {Return Self; } (For UIView * subView in self.view.subviews) {if ([subView isFirstResponder]) {return subView; }} Return zero; }  

.net - Converting Linq to XML query from C# to VB.Net. Can you spot my error? -


I am converting Linq queries from C # to VB.Net below. Can you see my error? The query contains 3 XML datasets, thanks in advance!

C # - It does a great job.

list & lt; Curriculum & gt; Course = Course course (in the CourseXML.Descendants (from the "Line") (string) course.Attribute courseCategoryXML.Descendants ("table") coursecategory ("code") is equal to (string) coursecategory Element (string) coursecategory.Element ("GRP") is equivalent to joining the CategoryXML.Descendants ("Table") category (string) category.Element ("GRP") where (string) coursecategory .Element ("RECTYPE") == Select "C" New Course (Category Code = Category Element ("GRP"). Value, Code = Curriculum Rum. Attribute ("code"). Value}) ToList & lt; curriculum & gt; ();

VB - I can not find any results from this, so I doubt that I am cutting incorrectly or incorrectly connected.

  Blank result = (Course from CourseXML.Descendants (ns + "line") _ coursecategory Join CourseCategoryXML.Descendants ("Table CTYPE is equal to CTYPE (course.Attribute ("code"), string in CTYPE (coursecategory.Element ("data"), string) _ Category CategoryXML.Descendants ("table") CTYPE (coursecategory.Element () "Gia P "on the string) is equal to CTYPE (category.Element (" GRP "), string) _ Where CTYPE (coursecategory.Element (" RECTYPE ", string) =" C "_ _ {_. Select a new course with CategoryCode = category.Element ("GRP"). Value, _Code = course.Attribute ("code") Value_}). ToList ()  

I used the following site to convert:

Course in the form of a short course list (course of course) = (Course in the course from XML.Descendants (NS & amp; "Line") _ Join the course category in the category. XML.Descendants (" Table ") DirectCast (course.Attribute (" code "), string) = DirectCast (coursecategory.Element (" data "), string) join category_x class.xml.Descendants (" table ") DirectCast (coursecategory.Element ( "GRP"), st Ing) = DirectCast (CategorykElement ( "GRP"), String) _ Where DirectCast (CoursecategorykElement ( "RECTYPE"), string) = "C" select _ new (of course)). ToList (course) ()

The main difference is the final selection.


uiviewcontroller - Where to place drawRect? -


I'm just starting to learn the drawing process for the iPhone, but something confuses me if I have a new view-based Start the application, and set up a new view class, then with the application that came with the scene, after that draw, put it in that new visual category, starts to work

but why I just saw your drawing routine in the scene configuration directly Can not install because I have tried it, and drawRect just do not get when I use setNeedsDisplay.

Thanks in advance for any help.

John Donor


c# - Browser.AttachTo method in WatiN to support all browser's child window? -


How to obtain the latest trunk modification of WatiN.Core.dll to support the "Browser.AttachTo" method? Or is there any other way of supporting the "Attachto" method (similar to ATT to IT) for Firefox?

I have just released WatiN 2.0 RC 1, which includes this functionality.


core data - What is the proper usage of NSManagedObjectContexts when editing/creating new objects (iPhone)? -


I am trying to find out the proper way to use NSManagedObjectContexts when you are viewing NSManagedObjects, editing Are and are making. I think the documentation and examples have explained to them how to use them in the most basic cases, but I'm not sure what is in a slightly more complicated setup than in the right way.

Setup:

  • 3 main screen: A list of objects, edit the object screen, and a new object screen.
  • List the background to add another thread objects.

Needs:

  • The list screen uses an MOC and an NSFetchedResultsController to get all these items.
  • Use MOCs to edit and save / delete new object screen objects and use NSFetchedResultsControllers for relationships.
  • Downloaded objects need a MOC so that objects can be saved in core data. Main thread).

Question:

  • How many MOCs are required?
  • How should manipulate these MOCs?
  • Possible answer:

    • A "View" MOC is never edited and this list Used in the screen. Use different MOCs for editing, new object screens and downloads when these MOCs save, then merge the changes back to "View" MOC. The "view" does not affect the MOC until such changes are saved. This is what I am doing; It does not seem that I am working smoothly because I hope to have a disconnect between editing and seeing and being able to check those things, who know that they can change. NSFetchedResultsController will have to wait for delegate methods so that they can complete every possible thing that may have changed, so it makes it even harder if I need to change some data in the list list.

    • There is an MOC for everything that I did for the first time, but it was not sure how to deal with editing and making. Now that I understand a bit more, I think I can edit the object or create an object and can cancel it on the rollback , I saw something that seemed like one Who had asked to create an undo group around the return when editing / creating and canceling, then I think that I can use a different MOC on the downloaded object as it Using It may end and edits in the main MOC.

    • Anyway, do not know what is the proper way can you help me?

    Disconnect the example for the first possible answer

    1. Save an object (1) edit moc. Notified with mock by notification.
    2. A new mock was created because I downloaded items in the background. Some items have been updated which are related to (1). Rescued. Merge with moc seen by notification.
    3. Edit (1) in the editing moc. Rescued. Notified with mock by notification.
    4. Problem: Because the edit moc never got a new mock change, when it saves it, it removes all the new mock changes it affects.
    5. SOLUTION: I realize that I can merge editing changes in Mach or I can always use a new Mock to edit things. However, I am moving in small things like this and want to find a solution, so it leaves me to believe that this is not the best answer.
    6. You must have at least one MOC per thread (they are not secure). You can do an MOC and other activity for the activity in the main thread list, for the downloader (in the background thread), and edit the new one.

      When you say that a disconnected, can you be more specific? Are you using Notifications ( NSManagedObjectContextDidSaveNotification ), and when you receive that information, then mergeChangesFromContextDidSaveNotificationNotificationNotification are done, remember that the merge on the main code Changes should be made to change the communication notification . In your visual controller with NSFetchedResultsController , you are handling all the cases of NSFetchedResultsControllerDelegate


Eclipse CDT setup for remote build -


Is there a better way to set up Eclipse CDT for local editing and remote building?

I'm working on code on C ++ project using GNU in Linux, under the CVS on Linux server.

When I am in the laboratory, I use Eclipse CDT on the Linux-X64 PC. This project is built on a Linux-X86 PC. In the lab (including CVS servers) all computers have NFS mount.

When I am at home, I use Eclipse CDT on Windows 7 PC. Windows PC connects to Linux CVS server via SSH tunnel. To edit the source, I reset the C ++ project on my Windows Eclipse workspace under the Linux Eclipse workspace. I (I can also do a remote CVS checkout on Windows PC.) To build from home, I I use a custom build command

  1. SSH in linux-x86 pc,
  2. my Linux eclipse workspace from rsync my Windows Eclipse workspace,
  3. From C ++ project and after that Specify the correct path to the file, the make Linux-x86 PC.

Every time I make changes to CVS without going through my experiment and going back and forth between the house, I use rsync when I transfer from laboratory to house, then I I compile the source of my Windows Eclipse workspace when I create it from home, sources are re-indexed back to the Linux Eclipse scopes.

Is there a better, less winning way to do this?

(I'm not interested in remote debugging.)

Netbeans of this Good support for I have tried to do it in eclipse, but Netbeans was built in support.


image processing - How to detect and correct broken lines or shapes in a bitmap? -


I want to find an algorithm that can find broken lines or shapes in a bitmap, consider a situation in which I have There is a bitmap with only two colors, back and white (the picture used in the painting books), there are some curves and rows that should be attached to each other, but due to some scanning errors, how do I credit the black bits sitting in black bits? Will? (After this work, I want to convert bitmap to vector file. I want to work with the potress algorithm).

If you have any ideas, please let me know.

Here is a simple algorithm to fix short intervals:

Most First, use a filter that makes any type of black pixel, its eight neighbors have black, this will increase your normal profile.

After this, use a thin filter that removes the additional settings but leaves alone the filled interval.

See this article for some filters and parameters:


solaris - How to add my application autostart in Solaris10 -


I created my application using Java. I also created RPM which works fine in the red gear. In that case I have to keep my application.desktop file to startup the application automatically in the startup directory.

Folder structure / etc / xdg / startup

But if this folder structure is not present in the solar system, then what do I do to automatically start my application in Solar-10? P>

Thank you Sunil Kumar Sahu

You have not specified this, but if you have a service , Which starts when the machine starts / restarts, then use the answer. Here's more information.


c# - Is an Event running in another thread? (.Net Compact Framework) -


I'm developing Windows Mobile 5.0 or higher .NET Compact Framework 2.0 SP2 and C # .

When I try to reach the width of control on a method which handles an event, then throws me the following exception:

Thank you!

An incident moves on that thread That's what it fired. So if the thread was added to different thread than the controller of the event, then it runs in a different thread, yes.


MSMQ Adding a delay on Messages -


I have a Microsoft message queue that pops up with messages if there is a problem processing the message, then I I would like to try the message again, I do not want to try the message again. What is the way to add a delay to avoid the message becoming available in MSMQ for some time?

The second option is another row (a retrieval queue) and it is reading every 15 minutes in the queue, but I can not do this.

What are you looking for "poison message handling" (even if this message is not a mistake, But there is a temporary environmental problem).

There are a lot of articles on this here:



In short: You have to take them back in a retrain queue .


MySQL join question -


Can anyone tell me that if it is possible to add these two questions in one after joining yourself, and if yes , How to do it

Query 1:

  select pm.username as user, as file name, name, status, UC as ID Uc.content_id, value as moderation_status. The myweb.ugc_meta on parent_content_id um LEFT JOIN myweb.ugc_content UC uc.content_id = um.item_id where uc.user_id = pm.id pm Join left myweb.userbase_member uc.content_type = 'my.photo' and uc.promoted = '1' and moderation_status = '' boundary 10  

query 2:

  select um where um.item_id = value myweb.ugc_meta ' passed 4780c650137a3409901286 '- - (ITEM_ID query content_parent_id from 1)  

ugc_meta in ugc_content album for photos The name is included. Includes rows for ugc_content albums and photos > The photos representing rows have a parent_content_id , which for the original line is Content_id I do not have the option to change the table or DB structure.

At the moment I am running a new query (query2) for each result line from query 1 which is the optimal sub; -)

Thank you!

You should be able to use just add one without the Ugiaiamtia table

  select pm.username as user, id, value file name, name, status, UC as moderation_status as uc.content_id: in order to use a different alias your parents So like to get in the table to join Parent_content_id, the parent.`value` on myweb.ugc_meta Um left myweb.ugc_content uc uc.content_id = um.item_id left Join myweb.ugc_meta parent on uc.parent_content_id = parent.item_id left myweb.userbase_member pm on uc.user_id = pm.id uc.content_type = 'my.photo' and uc.promoted = '1' and moderation_status = boundary 10  

I'm looking for is a left as well as former 'pass' Where yoga can focus on the fact that parents can not always be in the child's table, if in this case there are always parents, then you can use the inner joiner. Which will increase your functionality further.


javascript - /regex/(string) considered harmful? -


In Javascript you can match regular expression with regx syntax.

However the syntax is not 'as far as I know, nobody knows why?

A regular expression on some browsers, if so where a function, regexp (str) / Code> Method is equivalent to calling.

This is not recommended as the syntax is part of not , version 3 specification, and is not guaranteed to work:

  var result1 = Regexp.exec (str); // part / 2 results of ECMA-262 var = regexp (str);  

jquery / javascript setting width fails -


I had to face this problem: Based on numbers, I want to make a chart once it is interesting that it is very well Works on IE8 set on quirks mode, but fails everywhere I can not really say where this error is and I hope someone here can help me. I am using jQuery but have not worked either using getElementById () and element.style.width = Somevalue (i.e. jQuery): (

[edit: Full example Link deleted, pasty expired.]

Basically:

  and change on input = "Calculation Filt (1)" .... .. Function Count Field (FieldName) {value = $ ("# input_" + Area Name)) (); $ ("# Subtotal_" + AreaName) HTML (value); UpdateDigram ();} function updateDigram () {// is required to collect;) .val (); FancyMagic (); Value = 6 * value; , Maxwidth, maxval, etc ... // width = $ ("# animatebar_1") for 'normal' bar width.width (width) in the appropriate width; Var width = maxwidth * (value / max); // set on. ); // avg bar var avgtarget = $ ("# avgbar_1"); Var avgwidth = maxwidth * (average price / max); Avgtarget.width (avgwidth);}  

i tried all the FF, IE8 in different settings and operas and it just does not work. Zero IE8 quirks mode works immediately after the bar is set to width, interesting.

I'm pretty sure that this is just fooling me, but I would appreciate the help with this.

Thank you very early.

I think the problem may be using the span tag, you should use a div instead . Span tags ignore width.


jquery - JQGrid URL Sometimes including controller in call -


So in my ASP.NET MVC application, this code is in javascript function ...

  JQuery ("#SomeResultsGrid"). JqGrid ({url: 'SomeSearch.mvc / SomeSearchResultsGridEventHandler', ...  

This loads on my default page and is just OK (Fidler has been confirmed) Now, if I Go to that default page (via HFL.quial link), the URL that posts after loading, now some search. MVC / some search. MVC / some search resets look like grid aventhandler. How and how can I solve it? / P>

You are using a relative URI, so the URI will be considered relative to the current location. To create a perfect path, a / :

  jQuery ("# ​​SomeResultsGrid"). JqGrid ({url: '/ SomeSearch. Mvc / SomeSearchResultsGridEventHandler', ...  

The problem is, now it will not work in a virtual folder. We handle it with the JS routine that you know about the site root using the information in the site A. Masters.


c# - InvalidOperationException and Workflows in ASP.NET MVC -


मैं एक चल राज्य मशीन कार्यप्रवाह StateMachineWrokflowInstance का उपयोग कर ASP.NET MVC में क्वेरी करने के लिए कोशिश कर रहा हूँ।

यहां परिदृश्य है:

  1. कार्यप्रवाह क्रम विन्यास: जोड़ा SqlWorkflowPersistenceService , ManualWorkflowSchedulerService , <कोड > ExternalDataExchangeService और पंजीकृत कस्टम ExternalDataExchange ExternalDataExchangeService के साथ सेवा;

  2. निष्पादन अनुक्रम:

    < प्री> var उदाहरण = वर्कफ़्लोआरंटाईमैंड। क्रेतेवर्क्सफ्लो (प्रकार); instance.Start (); WorkflowRuntimeHandle.GetService & LT; ManualWorkflowSchedulerService & gt; () .RunWorkflow (instance.InstanceId); Var राज्य माचिन वर्कफ्लो इन्स्टेंस = नए स्टेटमैचिन वर्कफ्लो इन्स्टेंस (उदाहरण। वर्कफ्लोआरंटमैन, इंस्टॉलेशन। इंस्टेंसआईडी);
  3. प्राप्त त्रुटि:

      System.InvalidOperationException: आईडी के साथ "[GUID]" राज्य हठ की दुकान में नहीं मिला कार्यप्रवाह?  

क्या मैं कर रहा हूँ गलत?

जाहिरा तौर पर इस अपवाद के कई कारण हो सकते हैं

मुझे अपराधी का पता लगाने का एक तरीका मिला मैं सभी कार्यप्रवाह क्रम घटनाओं के लिए संचालकों जोड़ा गया है और एक सूची में इतिहास के रूप में अनुक्रम संग्रहीत और सूची उसके बाद RunWorkflow कार्यप्रवाह समाप्त किया गया कहा जाता है से की खोज की।

वर्कफ़्लो टिमटाइटेड इवेंट पैरामीटर वर्कफ़्लो निर्धारित एवेंटअर्ज एक अपवाद संपत्ति के साथ आता है जिसमें आंतरिक अपवाद शामिल है जो समस्या का असली स्रोत दिखाता है ।

मैं यह आशा में यहां पोस्ट कर रहा हूं कि यह अनुभव उन लोगों के लिए फायदेमंद होगा जो पढ़ रहे हैं।


mysql/php - store html templates within the a database -


I am thinking of the best way to store HTML templates in a database where I can retrieve them and include changes Able to do

Obviously I can keep them as a PHP and then 'Evil' record .... but I heard that it was bad.

Is there any better way? Edit:

Edit:

Sorry I was not clear ... I tried to simplify it by saying HTML Template ... What I really meant was small embed- Qualified HTML element (looks YouTube) ... instead of a complete site ...

Also, I will advise you to store them in a database on a file system as a template and store and include them. In a much more convenient when you need I also recommend using some kind of sense. It's a very easy tool, that's it.

However, if you want to do it manually, then that is what I do.

First of all, I store the template in a file file system if you want to use a database, this can be done simply to know that a database is usually such that When used for the goods, more land becomes the reason. For example, in the case of a YouTube video:

   

Then I will just type the PHP variable to str_replace , as much as PHP does with the wires.

  & lt;? Php $ template_path = 'template / youtube_vid.tpl'; $ Template_data = file_get_contents ($ template_path); $ Old = array ('{$ width}', '{$ height}', '{$ path}'); $ New = array (425, 344, 'v / zuZB2O6orV0 and HL = en_US and FS = 1 & amp;';); Echo str_replace ($ old, $ new, $ template_data); ? & Gt;  

And that will happen.

You can of course & lt; Php $ width; ? & Gt; Like placeholders and just the include template, but it leaves you at the risk of injection attacks. This is a safe path.


visual studio - Is there a way to always have vs.net run as administrator? -


Every time I want to open a solution in vs.net, I have to click on the first vs. icon, as an administrator Run, and then open the solution in the file system and search.

ie I can not just click on the solution file and fire things as it will not open since it runs me as admin.

Is there any easy way? (Vs.net 2008)

Right click on the Visual Studio icon and select "Properties" Choose a "Compatibility "Tab, and that tab should have the checkbox option of" Run this program as Administrator ".


c# - Better way of refreshing DataGridView.DataSource -


At this time I have a DataGridView in my app, which I call on my Linq-to-SQL Fill in sections like ...

  /// & lt; Summary & gt; To update the /// datagrid, the delegation resolves the threading problem /// & lt; / Summary & gt; Private Zero updateInfo () {// Linq to datagridview; Display all var queries in dbh = n. Select n; ItemDataGridView.DataSource = query.ToList (); }  

So every time I add new information and I turn on this refresh, the focus of the table change is, which means that if I am in a line, then it will give me a And a. And one incident has been tied to the change of line, so there is reason to run this event, while the list is fresh.

I do not think Linq-to-SQL bounded DataGridView was there a TableAdapter was formed, and instead of changing the data in DB you This will only be inserted using the TableAdapter , which automatically DataGridView correctly.

So I am thinking that I should do something that I should do that smooth refresh

This does not look like a L2S problem I think it looks more like a problem with any grid you are using. It is understandable to supply your grid with all L2S data, that the current line of the grid will change after a refresh. Is it possible to disable the grid, what do you want the current row, and then enable the grid? I have done this in the past.

Randy


Any way to make nice antialiased round corners for images in python? -


Is there any way to create good rounded corners with python? Presently PIL and GD2 are used in my project. Both have a arc () method, which allows you to attract a square-circle, but there is no square-cycle antialiase, so the image looks crispy.

Is there a well-organized way to make antihilas / smooth round corners?

What I usually do is to use an image, for example, a mask, Such as:

border tag

  border = Image.open ('border.png') source = boundary. Convert ('RGB') img.paste (source, mask = border)  

The shape of the mask can be changed to fit the dimensions you want. Just make sure to use the image. ANTIALIAS method

For more information, I wrote some time ago (shameless plug)

If you want more control over the size and radius then you have to use arc or peal But I have made this spherical rectangle with PIL which looks quite smooth for me:

Here I used to attract it! / P>

You may want to check the fret: This Python And is written in the PIL and can apply to the corners of the goal more.

alt text

here The code used to implement round corners is a link:

It also looks quite easy for me.


iis - WCF Syndication Service not found in II6 -


I have a WCF syndication service that works properly when run locally on Windows Vista or Windows 7, but When it becomes a Windows 2003 server, it can not get a 404 (resource).

Non-race WCF services work fine on this machine, so I know that .NET 3.5 is properly registered in IIS.

Any suggestions?

I believe this issue has been raised several times before IIS searches for WCF 404 , Or checkout.


stored procedures - Asynchronous Storec Proc without waiting for completion -


I have a client application that erases the data in the raw table This client application creates an asynchronous call in a stored procedure Which actually parses in the raw data table. This processing is controlled by a stored procedure. It can take up to half an hour to run the stored procedure. We want the client to call the application to exclude the stored proc and stop running completely. As soon as we kill the client application, which calls the stored procedure, the stored procedure is executed.

What is the best way to get it? I do not want to run a job on the server I need client applications to trigger this processing. A database trigger (my first consideration) does not resolve this problem because it does not meet that insertion, unless the stored procedure that triggers the trigger call is complete.

Here is the Async method I am using LINQ. Can I modify it somehow? Or do I need a new design altogether?

  partial class metadatacontact {Representative Processcomple Seqal 2 Delegate (Int Frequency ID, Int. Cycle ID); Public Zero Process_CompleteCycle2Aynync (int? FrequencyID, int? CycleID) {Process_CompleteCycle2Delegate Full ProclamationGate = New ProcessCamilyCal 2 Delegate (this.Process_CompleteCycle2); IAsyncResult async = fullCycleDelegate.BeginInvoke (instance id, cycles, blank, blank); }  

Look for a reliable and consistent way of the transaction.


sql server - What gets disposed when SqlCommand.Dispose is called? -


itemprop = "text">

After implementing SqlCommand IDisposable, a SqlCommand object must always be settled. I personally wrap one of the experiment statements around me. However, I see a lot of code that resolves the SqlCommand object without any obvious problems.

I understand that the final providers will eventually call for garbage collection, but since in most cases (and never at all) other reasons why the code is not crashing due to running out of resources?

In our own code base we have a code that runs 24x7 without settling orders. I would like to clean it, but when it is not causing any problems, then it is difficult to justify it. I like the base class call (component) settlement method, and the garbage collection starts jumping. If the disposal of public sub-disposals (disposed in the form of settlement in the form of settlement), then settlement ', then in case of the same disks (s) in the lock of the lock (if I do not have software and nothing). So me Sight. There is no container, I do not have anything. again. Container Remove (m) and if if I If there is no avant, Dim Handler as EventHandler. Item (component.eventdispended), EventHandler) If there is a handler, then nothing handler. Invoch (m, event.rg.free) end if end of termination lock end if GC.SuppressFinalize (I) ending sub

I found it using.


VIM Modality interface implementation -


I am searching on Google and here is thought to apply any hints or tips and tricks such as instruments Interface command and insert mode) and possible [demo] command or keystrokes. Is there a library in it?

No, I do not think so. Define the way the app responds to the key key responses to the app.

The intermediary is how your app responds to keystrokes, it is not a magic ingredient that can be bolted. Just give feedback on your app's keystrokes, and if you want some keystrokes to switch between input and editing mode (or whatever), then define that functionality in your application, attach it to the key and optionally Update your app to a status line or something indicates which mode is currently up to.


xml - Xquery: nested ifs -


Basically I have several views which can be empty, if they are empty then I do not want to output it to parent node. If all the sequences are empty then I should have a node. Basically I have a code, which does not work:

  $ a: = // Let's run $ b: = //b Return & lt; Root & gt; {If (exists ($ a) or exists ($ b)) then & lt; Div id = "container" & gt; {If (exists ($ a)) then & lt; H2 & gt; Like & lt; / H2 & gt; & Lt; Div & gt; {$ A for loop for sequence ...} & lt; / Div & gt; Else ()} {If (present ($ B)) then & lt; H2 & gt; BS & lt; / H2 & gt; & Lt; Div & gt; {$ B for loop sequence ...} & lt; / Div & gt; Else ()} & lt; / Div & gt; Else ()} & lt; / Root & gt;  

You have a simple syntax error in your query:

  if (exists ($ a)) then & lt; H2 & gt; Like & lt; / H2 & gt; & Lt; Div & gt; {$ A for loop for sequence ...} & lt; / Div & gt; Other ()  

Then the section should be an exquire expression, but here you have two exquisite expressions, and lt; H2 & gt; node and & lt;

  If (exists ($ a)) then (& lt; h2 & gt; as  

is a clean move that you can use to organize To some extent the query expresion if (exists (a)) then b and () is equal to if (a) then b and () , since calling the boolean After it is presented around the predicate. In return, this is just equivalent to B [A] , as a method can be hoisted.

Using this trick, the query can be written more concise:

  let $ a: = // one let $ b: = // b Return & lt; Root & gt; {& Lt; Div id = "container" & gt; {(& Lt; h2 & gt; AS & lt; / h2 & gt;, & lt; div & gt; {...} & lt; / div & gt;) [$ a], (& lt; h2 & Gt; BS , & lt; div & gt; {.. ..}} ) [$ b])} & lt; / Div & gt; [$ A or $ b]} & lt; / Root & gt;  

c# - WPF - Updating DependencyProperty Metadata -


What is the technical reason for being able to update a dependency property's metadata?

If you try to do something like this below, it will produce an exception:

Attribute metadata not be changed after attributes are associated with property can.

  MIPROPROT Default metatata Property-Chengalated Callback = New Property Changeback Callback (MyMethod);  

There are many advantages of unchanging objects, one of which is thread-protection.

Besides, metadata is present on a per-type basis; The Property-Changed Callback setting will clear all other callbacks directly in legacy order.


Informix with NHibernate -


I'm trying to work with Infobilch to work with NHibernate on Windows 7. I have a connection string, which now works well with information, this is,

database = db; Server = server: port; UID = Username; Password = password; Pooling = false

I am IBM Data. Version 9.0.0.2, using the Infomakers .NET Provider.

We have many different applications that work well with this provider with the informative servers we are running.

My Nibbuttonation is connecting to the application interface server now, but the problem is the form of SQL that is producing it.

If my nihbernate code looks like this, then using

  (eSation Session = OpenSession ()) {return session. Cretecitreria & lt; DBTable & gt; (). Add (restrictions. A ("field value" is true)). List & lt; DBTable & gt; (); }  

I'm new to Informix, but if I'm not mistaken then the correct SQL will be

Select * from DBTable where fieldValue = 'T' < / P>

But instead of producing SQL,

select from DBTable * where fieldValue = True

I'm not working as well in this example in the nineteennet file Tried to add

  & lt; Property name = "query.substitutions" & gt; True = T, False = F & lt; / Property & gt; & Lt; Property Name = "query.substitutions" & gt; TrueT ', false' F '& lt; / Property & gt; & Lt; Property Name = "query.substitutions" & gt; True = 'T', false = 'F' & lt; / Property & gt; & Lt; Property Name = "query.substitutions" & gt; TrueT, false F & lt; / Property & gt;  

But it does not seem to work just because I can not find a consistent documentation about how to use the query, and depending on which database type you are using Looks different.

What kind of NHibernate are you using?

What is the property type of the fieldwalls?

Boolean restrictions are working properly, I am using inputs and queries with Nfernet These relevant configuration values ​​are:

   

concurrency - C# how to protect the field of an atomic class? -


I am trying to create a nuclear reference class in C # and I want to preserve field context, but I Also return the value to the received method:

  class atomic reference (private object_value; public atomic reference) {_value = new object ();} public atomic reference (object value) { Optimistic Set (Price);} Public Object Comparison and Set (Object Newwell {Return Interlock. Exchange (Ref _ value, New Vale)}} Public Zero OptimisticSet {object} while {_value == Interlocked.CompareExchange (reference_value, _value, newValue))}} public object () Receive () field reference consultant not leak object constVal = _value; return concert;}}  

This is a ruthless path around the problem ... I just read the fields Can not, because I should be able to set it My what better solution?

updated: Thanks for the quick responses! It was correctly told that if I only return the _value then the context will be safe. I also want to change the view. If I allow changes outside of the nuclear context, then it defeats the whole purpose of creating this class ... is there a way to do this?

Even if you try, C # (without insecure code) or Java It is not possible to reverse the reference of a field in (I do not mean the context of an object)

You can just type return_value; Your call-making fields will not be able to write.

/ div>

c# - Managed C++: Strings in List is not passed back to caller -


मेरे पास एक सी # नेट कंसोल अनुप्रयोग है जो सी ++ नेट वर्ग पुस्तकालय को कॉल करता है। हालांकि, जब निम्नलिखित आवेदन निष्पादित होता है, तो सूची रिक्त हो जाती है !!!

अगर मैं इसके बाद की टिप्पणी में बताई गई रेखा को निकालता हूं, तो कोड काम करता है। मुझे इसके लिए कारण समझ में नहीं आ रहा है।

अगर मैं सी ++ क्लास पुस्तकालय में सूची के लिए मेमोरी को पुनः आवंटित करना चाहता हूं तो मैं नीचे करने की कोशिश क्यों कर रहा हूं, यह करने के बारे में सही तरीका क्या है ?

सी # 2005 कंसोल एप्लीकेशन

  क्लास कॉलर {स्टैटिक व्हाइड मेन (स्ट्रिंग [] एआरजीज़) {कैली कैली = न्यू कैली () ; सूची के & lt; स्ट्रिंग & gt; S = नई सूची & lt; स्ट्रिंग & gt; (); callee.DoSomething (रों); Console.WriteLine (s.Count); // प्रिंट्स 0}}  

सी ++ 2005 कक्षा पुस्तकालय

  सार्वजनिक रेफ़ क्लास Callee {सार्वजनिक: शून्य DoSomething (सूची & lt; स्ट्रिंग ^ & gt; ^ सूची); }; शून्य Callee :: DoSomething (सूची & lt; स्ट्रिंग ^ & gt; ^ सूची) {list = gcnew सूची & lt; स्ट्रिंग ^ & gt; (); // इस रेखा को निकालें और यह सूची काम करती है- & gt; जोड़ें (जीसीएनव स्ट्रिंग ("टेस्ट स्ट्रिंग 1")); सूची- & gt; जोड़ें (जीसीएनव स्ट्रिंग ("टेस्ट स्ट्रिंग 2")); आप इसे C ++ / CLI (सी # कोड के अनुसार) के समतुल्य चाहते हैं  

  क्लास कॉलर {स्टैटिक व्हाइड मेन (स्ट्रिंग [] एआरजी) {कैली कैली = नया कैली (); सूची के & lt; स्ट्रिंग & gt; S = नई सूची & lt; स्ट्रिंग & gt; (); Callee.Do कुछ (रेफरी एस); Console.WriteLine (s.Count); // प्रिंट आउट 0}} सार्वजनिक वर्ग Callee {void DoSomething (संदर्भ सूची & lt; स्ट्रिंग & gt; सूची) {सूची = नई सूची & lt; स्ट्रिंग & gt; (); सूची। जोड़ें ("टेस्ट स्ट्रिंग 1"); सूची। जोड़ें ("टेस्ट स्ट्रिंग 2"); }}  

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

समतुल्य C ++ / CLI सिंटैक्स इस प्रकार है:

  सार्वजनिक रेफ़ क्लास Callee {सार्वजनिक: शून्य DoSomething (सूची & lt; स्ट्रिंग ^ & gt; ^% list); }; शून्य Callee :: DoSomething (सूची & lt; स्ट्रिंग ^ & gt; ^% सूची) {सूची = जीसीएनयू सूची & lt; स्ट्रिंग ^ & gt; (); सूची- & gt; जोड़ें (जीसीएनव स्ट्रिंग ("टेस्ट स्ट्रिंग 1")); सूची- & gt; जोड़ें (जीसीएनव स्ट्रिंग ("टेस्ट स्ट्रिंग 2")); }  

"%" को उस प्रकार के अलावा जोड़ने के लिए सूची को एक ट्रैकिंग संदर्भ के रूप में पारित किया जाएगा।

ट्रैकिंग संदर्भों के बारे में अधिक जानकारी

पर पाई जा सकती है

How do I use PHP namespaces with autoload? -


When I try to use autoload and namespaces, I get this error:

Fatal Error: 'class' on line 10 /usr/local/www/apache22/data/public/php5.3/test .php >

Does anyone tell me what I am doing?

This is my code:

Class1.php:

   

test.php:

  & lt ;? Php function __autoload ($ class) {$ class requires '.php'; } Use the person \ Barnes \ David; $ Square = new square 1 (); ? & Gt;  

Class 1 is not within the global scope.

See below for a working example:

  & lt ;? Php function __autoload ($ class) {$ parts = explode ('\\', $ class); End ($ parts) is required '.php'; } Use the person \ Barnes \ David as MyPerson; $ Square = new MyPerson \ Class1 ();  

Edit (2009-12-14):

To just clarify, use "as ..." My use of the example was simple.

The option was:

  $ class = new person \ barns \ David \ class 1 ();  

or

  Use Person \ Barnes \ David \ Class1; // ... $ class = new square 1 ();  

.net - Error in creating windows handle -


I have one. 2.0 Window app is created. This application forms the form control dynamically Now when I'm trying to run the application, it is throwing an exception "Error creating window handle". After this, the application is hanging and nothing happens. For the first time, the form is displayed properly. On a particular event, I am trying to reload the same form, while at the time I am getting this exception. Nobody knows how to get rid of this. Any help would be great enough :)

I hit a point like this recently.

There is a limit of just 10,000 handling procedures - if you are dynamically making a complex UI then you can easily reach.

To check that this is happening to you, use the Task Manager - go to the Process tab, turn on the columns for "User objects" and "GDI objects". Then, reproduce the problem.

In my case, the user object count was actually killing 10,000 and then "boom".

If this is happening to you, then to ensure that the old control is properly settled before making a new form, you may have to redesign to use less handle That is - this is what I had to do.


silverlight - cross-domain problem -


I am using a silver with wcf and it runs when I use the .web project , But when using the light silver project, the following exception is thrown:

There was an error while trying to request the URI. This could be due to a cross-domain path without an appropriate cross-domain policy, or for SOAP services, trying to access a service without a useless policy. You may need to contact the service owner to publish a cross-domain policy file, and to ensure that the HTTP header related to SOAP allows the sending of the Web service proxy without using the InternalVisibleToAttribute attribute This error can also be caused by using internal type. Please see the internal exception for more information.

I want to use the silver light project to debug my code

thanks in advance

To access network resources from Silverlight, the hosting domain must provide the client access policy file; This is designed in such a way as for security reasons. See here for details:


java - Modifying AMF response at runtime - How to? -


I have made a simple Flex application (using blazads) which uses the flex remoting to open the Java service and display the "person" details. Therefore, my person class looks something like this:

  class person {public full age; The name of the public string; As a Java developer, it is my understanding: When I run Front Flex app in my webpad, an RPC call is executed and Blaze's works hard to use properly, getting results as an object, Changing the object to AMF format (serialization) And, then the web / app server sends this response back to the app requesting HTTP. The Flex app now works to distill the object received in AMF format and somehow uses its use. 

Here's my question: I would like to amend the feedback before reaching the Flex application by modifying the person's object's attributes. I have a filter to do this, however, I'm not sure how to delete the AMF stream, modify the object, serial the object back to the stream, or somehow recreate the stream

Is there any way to do this? Where should I start?

If the question was very confusing then this is a small version: How can I modify the AMF-X content type reaction stream before reaching the Flex app before using the Java feature? ?

It is not easy to do CRALizing and AMF on your own, so definitely avoid it. A better way to convert data into the right format in your back-end code. From Flex, call a service method on the back-end, then receives the data and converts it into the correct object structure before sending it back to the flex.


nhibernate - How can I use "Expression.Not" with text field? -


I "expression" with text field. How can i use

I need to select all the records, for example, this code return runtime error from NHQuestionCount, excluding "katest"

  NHQuestionCount [] Stats = NHQuestionCount.FindAll (order .asc ("NameFull"), expression. (Not an expression ("name root", "katext"));  

I can not comment on my rest code, but your use of the expression is OK .


expression blend - split video and keep it runing -


How can anyone hinders how to split the video (and it can be played in separeat parts) I mean by dividing here, for example, to divide it into 4 parts and each part can be run (payment)

to search for a point in the video -seff option with ffmpeg and then -vframes or -t A The specific number of frames or seconds used to extract respectively.

View


flex - How to get selected items Drag & drop component? -


  How can it get all the selected items selected from the code given below ContsList? & Lt; Mx: Datagrid id = "dg" dataProvider = "{cNumbersList}" allowmultiplashpn = "true" dropEnabled = "true" dragMoveEnabled = "true" & gt; & Lt; Mx: column & gt; & Lt; Mx: DataGrade column datafield = "ContactName" headline = "name" /> & Lt; Mx: Datagreat column datafield = "no contact" eaderText = "no contact" /> & Lt; / Mx: column & gt;  

  & lt; Mx: label text = "selected contact:" width = "122" color = "# C90855" height = "16" /> & Lt; Mx: DataGrade id = "selectedContsList" permissionMultiplashial = "true" draggable = "true" dragged = "true" & gt; & Lt; Mx: column & gt; & Lt; Mx: DataGrade column datafield = "ContactName" headline = "name" /> & Lt; Mx: DataGrade column datafield = "no contact" headtext = "no contact" /> & Lt; / Mx: column & gt; & Lt; / Mx: data grid & gt;  

What's wrong with the following?

  & lt; MX: DataGrade ID = "Selected content list" Detector = "{dg.selectedItems}" allowmultiplash = "true" draggable = "true" dragged = "true" & gt;  

Thinking that you are definitely asking ...


asp.net - Trouble switching to the beta ajaxcontroltoolkit -


I want to switch to the beta version to see if it fixes a problem, by which I download it Done and put two dll files in my bin folder I deleted the old reference of these files in Visual Studio and added them again.

When I run my program, I get an error:

Microsoft JScript Runtime Error: AjaxControlToolkit requires ASP.NET Ajax 4.0 script to ensure that the script is correct Version is referenced. If you are using ASP.NET ScriptManager, switch to AjaxScriptManager in System.Web.Ajax.dll, or use ToolkitScriptManager in AjaxControlToolkit.dll.

I can not understand how to fix this. I have a new system. Web. Ajax Dial has been added to Visual Studio, but I can not see any AjaxScript manager anywhere ...

Any ideas?

This error has been fixed for me adding the following to the aspx file:

   

javascript - Why does the whole page refresh when I use jQuery to increase or decrease the font size? -


I have an HTML page, where clicking on the font size to reduce the font size and the same button amplify me Button is needed.

I am using jQuery like this:

  $ ("p"). CSS ("font-size", "20")  

However, when I do this, the size of the font probably increases for 2 seconds and then appears back to normal. The page is fresh after clicking on that button ... why is it?

You have a false return [Preventing the default job] so that the page can not be posted back.

In addition, I would suggest using two different CSS classes for this and using those sections

P>


How we can update our website created in ASP.NET? -


I know that before we would like to modify and re-upload our site, we would rather databases instead of direct modification of the database Can you make any software to update?

I assume you want a tool that will apply changes from one environment to another? See what the case.


how can I control the opacity and z-order of the top level window in WPF? -


I would like to create a small WPF app window semi-transparent and at the top of other windows.

When I change the settings in the top-level window, it only affects the content, not the title bar or the boundary.

Is it possible with WPF ??

Thanks

Windowstyle and allows Transparency to have two properties that you have to change .

Your window sits at the top of all other windows, so you also want to set it to the right. To move the window, handle one mouse event from the limit on which you are added, then call the event handler.


c# - ASP.NET: UrlReferer has wrong value, interrogating in a static (webmethod) page called from jquery -


Can anyone help? I am trying to inquire with UrlReferer whcih which should contain Google.com but includes my current site. My web page is a standard HTML page and jquery calls are a static method such as

  [WebMethod] Public static zero ProcessTracking (string jsonString)  

In this method I do a standard lookup on request. Similar to the URLRFrror,

  string referrals domains = HTTPPointText Running request. URL Referrer.host;  

But it always includes my current domain, it was a little suspicious, so I created a standard asp.net page and did the same and without it 100 % Works. Issue ..

It seems that when my HTM page calls through my webmail (static) and inquires with UrlReferrer then always My current site comes back which is wrong.

Does anyone know how to work around?

I have session_start etc. in global.asax but no fixes.

Edit: How do I call a page from jquery in HTML

  $ Ajax ({type: "POST", Url: "MyService.aspx / ProcessTracking", data: jsonData, contentType: "application / json; charset = utf-8", data type: "json", async: true, success: Function (msg) {}, error: function (msg) {alert (error);}});  

This script is hosted on your page, right? In that case, the referrer will be your site.

If you want a referral for the page, then you have to give it as argument with your Ajax call; It will not be present in the HTTP header.

You can read the page referrer from the document.referrer property.


c# - How to wrap .Net data provider for entity framework -


I will try to explain this question again:

I started entering such a unit framework The way the query was intended and its results can be logged with the time of query execution. Has wrapped the provider to block the communication between the entity framework and the original provider. It also provides tracing facility which I intend to use.

What am I confused about this, the integrity of this cover is what he has written. Presently he has simply wrapped the connection, command, transaction, dataarder, and providerfactory. I'm not aware of all the ways that the unit communicates with the framework provider. I wanted to know all the ways with which the entity framework can use data providers. For example if the unit uses framework data adapter or dataset e.t.c.

is a simple unit framework provider.

Of course, real dBMS cases different from MS SQL Server You will meet many problems in, and in theory as well, all of them can not be solved.


vb.net - Clickable URL in a Winform Message Box? -


I want to display a link to help in a message box. By default the text is displayed as a non-selection string.

Displays an option URL with message box, with a message and providing that help button Do that which takes you to the URL: Message Box. Message (Message box) icon, messageBoxDefaultButton.Button1, 0, '0 by default Otherwise MessageBoxOptions Enum "http://google.com", "Keyword" ("Test Message", "Caption", Message Box Button. Use)

Note that this code can not be loaded in significant load events, the help button will not open the link.


c# - Where to keep things like connectionstrings in an IoC pattern? -


In my eternal search for at least sucking, I am currently investigating the MVC turbine for doing IoC dirty work .
I am using the example of mvc turbine stupid food as a lead and thus look at things logically so far. Although I am pointing towards the turbine project, I am guessing the philosophy behind it, something to read and the pattern for rare podcast is normal, I am new to the IOC concept and I have some questions.

So far, I have an Iisisregistration entry for each IRPorporation which I want to register
For example:

  public class UserRepositoryRegistration: IServiceRegistration {public zero Register (IServiceLocator locator) {locator. Registrar & lt; IUserRepository, UserRepository & gt; (); }}  

Solid implementation of IUserRepository however requires some configuration. The path of the db4o file to use some connection string or in this case.

Where and how should I give this information?

Both Robert and Lucas hit the nail on their head with their answers. All "additional goods" for the account will remain within the User Repository Class, in this way the Turbine ND has been implemented in the present.

However, there is nothing that prevents you from creating a new class called Connection String Providers that can be injected into your user repository that will provide the connection string (whether it is hard-coded Or read from a config file.

The code can be as follows:

  public class ConnectionStringProvider {public string ConnectionString {get {// around yourself}}} public Category UserRepository {Public UserReposit Ory (ConnectionStringProvider Provider) {// // Set the internal area here to use // later with db connection}}  

From here, you can use ConnectionStringProvider for UserRepositoryRegistration Adding a registration category and turbines will handle the rest for you.


mysql - How to design a stock system using Visual Studio 2013? -


I have a project now and it requires a SQL database. This project is like stock system

Currently I started this:

  Add -> New item - & gt; Service based database server explorer - & gt; Tables - & gt; Add new table - & gt; ID, Name, Price, Description - & gt; Update Data Source Added - & gt; Add new data source - & gt; Database - & gt; Dataset - & gt; Selecting My Database - & gt; Check Tables  

Then I created the text box and label in the design

I created the contents of these text boxes in the database so that I could post the program I can use them in the part but at present it is to know how to do it. I have seen many guides but they are different for earlier versions of Visual Basic, who have such features like Visual Basic 2013 are not there. I understand that I need to connect to the database, though I'll need more help.

Finally, one of my input is an image. I have currently saved the image in a variable, but I do not know how to input this variable into the database. I will input everything like this I would like to take them out and put them in the list book in a later part of the program.


python - Operational Error in SQL -


I am running sqlite3 and I can not, because in my life it shows what is wrong with my code Used to be. Keeping in mind that while creating another table before the database does not do the accident, I suspect it might be a case of capitalization on a SQL statement, but it was usually working a few days back.

Create a table function

 Db: cursor = db.cursor () cursor.execute ("Choose sqlite_master name where name =?", (Table_name,)) as  def createtable (db_name, table_name, sql): sqlite3.connect (db_name) result = cursor.fetchl () keep_table = true if LAN (results) == 1: response = input ( "Table {0} already exists, do you want to restore (y / n):" .format (table_name)) # response feedback == 'Y': kept _table = wrong printed ("{0} table again - All existing data will be lost ". Format (table_name) cursor.secute ("drop table if {0}" format (table_name) is present) db.commit () elif response == 'n': print ("current table was placed") Else: print ("Wrong input, please try again") #validation measure if len (result) == 1: response = input ("table {0} already exists, do you want to restore (y / n):" .format (table_name)) If response == 'y': keep_table = false print ("{0} table will be rebuilt - all existing data will be lost" .format (table_name)) Curse R.exicute ("drop table if exists {0}". Format (table_name)) db.commit () Other: kept_table = if not wrong: cursor Execute (SQL) db.commit ()  

Tables which are causing the problem?

  def create_customer_table (): sql = "" "Create Table Customer (ClientIIT Integer, Firstname Lesson, Last Name Text, Street Text, Town Text), Postcode Text, Telephone Number Text Ignore the fact that it is not dentistic, it is my email address text primary key (customer ID), "" "" (DB_name, "customer", SKL)  

Program (Order ID) Foreign Key (Customer ID) Reference Customer (Customer ID) Customer ID (Order ID Integer, Customer ID Integer, Date Date, Time Integrated Primary Key (Order ID) Foreign Key (Customer ID)

Here I have an error:

  traceback (most recent call final) "" _ _ _ _ _ _: file "/ user / x / download / manageable_marg_015.py", line 110, in & lt; module & gt; Create_customer_table ) File "/ user / x / download / management_market_mark_015.py", line 78, create_customer_table create_table (db_n) (": Syntax Error:      )," ame "," customer ", sql file," / user / x / downloads / managment_mag_2015.py ", line 33, in the create_table cursor.excute (sql) / Pre> 


osx - How to let multiple components/controls share similar action in Xcode -


I'm using Xcode 6 and Swift to develop an OS X app, not iOS. Suppose we have two toggle buttons and each one controls Cambodia. Press the button every time, it will enable or disable Cambodia in control. I can definitely set different actions for each button. Since I have ten buttons, this approach contains many unnecessary code.

  @Inbooting Function Click BTN1 (Sender: NSBitton) {If Combo Box 1.Nenad == True {COMBOBOX 1.Annal = False; } And {combobox1.enabled = true; }} @Ebooting Function Click BTN2 (Sender: NSBitton) {// same code for combobox2}  

Is there any way to make it easy, such as the different sender, VB Is NET similar?

Update: I found an uncompromising solution for this

I now control / drag two buttons in one action in ViewController.swift And also give a different tag to those two buttons Button1.tag = 1, button2.tag = 2. The code now looks,

  // button1.tag = 1, button2.tag = 2. @Ebtension Funk Click Button (Sender: NSButton) {Switch (SendTag) {Case 0: Combobox 1. Enabled =! Combobox 1 capable; break; Case 1: Combobox 2. Enabled =! Combobox 2 capable; break; Default: Break; }}  

This resolves a part of my problem Next, I'm surprised that there is no way to access / search through controls / references, for example a string or Tag or anything name Pseudo code would like the following,

  // button1.tag = 1, button2.tag = 2. @ ebouting function click button (sender: NSButton) {// pseudo code code box [button.tag] .enabled =! Combobox [button.tag] capable; }  

be able to bind you to all NSButton Control the events to control the same button: ( NSComboBox ): Method You can do this via the interface builder or via the setAction: < / Code> can be obtained through the method.

Selectors in swift are just strings, like "button is clicked:" , but I wrap them in the selector for clarity in the initials I like (like selector ("button clicked:") ).


file io - For loop for ArrayList in java -


So I'm having trouble formatting as a .txt file:

  31,718 Philip Nenox 55.0 20.00 11528 Nancy Soldier 40,0 10.45 16783 John Connaught 30.5 10.00 10538 Peter Duncan 45.0 10.75 21O15 James Harold 32.0 10.50 61326 Harry Kuhn 25.0 12.30 Now I know there is purposively The errors inside .txt file, and that's where my  hold (InputMismatchException n)  comes into play. I want to select any mismatch in the .txt file and be able to store it in another .txt file. 

The part I got stuck on is that I can not find this InputMismatchException is found ...

I tried a for-loop , But a loop out of my try / hold method is continuing to see the .txt file successfully i setting int i = 0; does not initially even start my program because the Arrayel arreremployee is of size null ? (What do I understand from Java)

This is my code (where is your Windows user name):

  public class key {public static zero main (string [] Arg) {Aare list & lieutenant; Employee & gt; ArrEmployee = New Arrestist & lt; Employee & gt; (); // Array try for employee objects {scanner txtIn = new scanner (new file ("/ users / & lt; user & gt; / document / workspace / comp 249 - assignment 3 / src / payroll.txt")); While looping through the (// txtIn.hasNext ()) {// payroll.txt file and its employee has been working long time, employee numbers from employee numbers = txtIn.nextLong (); String employee name = txtIn.next (); String Last Name = txtIn.next (); Double hours worked = txtIn.nextDouble (); Double Hourly Access = txtIn.nextDouble (); ArrEmployee.add (new employee (employee number, employee name, last name, hours work, hourly)); }} Catch (FileNotExtensionE) {System.out.println ("File Payroll.TXT was not found."); } Hold (InputMismatchException N) {ifEremployee.get () getHourlyWage (). & Lt; 10.35) {println ("Minimum of Hourly Pay"); }}}}}  

As your main error, I see that You have time to loop / catch blocks inside your line-reading attempt, and therefore there is no way to get back the loop when you run into an error.

Instead of:

  • Yes, get your file first try / hold (File Not Access Exception ...) and enter your complete code inside it.
  • Then do your InputMismatch for Exception while holding the loop inside.
  • I myself, I want to use a scanner based on the file, say that the name is, fileScanner ,
  • and my loop while loop While (fileScanner.hasNextLine ())
  • While the first row inside the loop, I
  • On the basis of the loop, I will create a second scanner. Received, possibly lineScanner , ie, scanner line scanner = new scanner (line);
  • And I parse each token with this token, and inside Inside / Undo input input block . If this fails, then it should catch up, and you can handle it.
  • As noted by Tom, if you are using Java 7, go with it. This way your scanners will be automatically shut down when you work with them.

In the pseudocode, try to find the file with the

  and make the fileScanner scanner object while creating the file line from the next line of fileScanner next line fileScanner To use Try with resources, parse each token in line in line using line escanner line. ... Create an employee example with information received in the place of the erologic. Grab the input mismatch error Send the line to the end of the file while the file scanner does not have the next line is caught. File  

python - iPython Notebook in Firefox - Warning: unresponsive script -


I had a long script running on iPython notebook in Firefox for a long time. I came back and looked like this, So I saved it and stopped it.

When I open the script again, I get a dialog box pop up with the following error:

Warning: unresponsive script

This A script may be busy on the page, or it may stop responding stack overflow. You can now stop the script, open scripts in the debugger, or continue the script.

The options are 'continue', 'script script', and 'debug script'. By clicking on any one of these results, the dialog box disappears and the iPython notebook is unresponsive (for example, ctrl + enter creates a line-break in the current cell instead of running it).

However, most of the cells in the lower part of the script were cut off. They were some valuable codes, which seems to have gone away, this is a very bad result!

I have tried rolling back, but the last roll-back point is also revealed below. Any support here very much appreciated!

I have done this work now and leave it in the hope of helping others.

The cause of the problem appears to be longer than one of the cells - everything under this line was cut into the iaththon browser, but I found out that it still exists. The Ipynb file and everything I had to do was removed, some output lines were deleted, and when I lost the file again, without any problems and my code was cut once was available.

Store everything in the notebook JSON format. In my case, I needed to remove the output from a cell that I did:

  1. Browse in your iPython notebook directory (where not ipython.exe resides) - for me they C: \ user \ myname \ document \ IPython notebooks
  2. abusive notebooks. Right-click on the APINB file , and edit in a text editor - my choice is Notepad ++
  3. Scroll to the cell that has generated many output lines from each of these lines Inside the Output property of "output_type" is inside: "stream"
  4. Remove an arbitrary number of these output entries, but Output Remove anything outside the property And make sure to remove it from behind a tailing comma in front of the low comma so that the resultant JSON is made well

A specific line of output looks like this, remove many of them My script is run again in the browser:

  {"output_type": "stream", "stream": "stdout", "text": ["\ n", "now Up to 150000 records have been added "]},  

python - Can SQLAlchemy Date Time object display local time zone in Flask -


This is my first stackoverflow phrase, sorry my syntax.
I am trying to time-stamp in a timestamp without a date. Time zone in the SQLAlchemy database displays the time in the user's browser in their timezone over time, not UTC.

Here is my Python / flask code (I'm beginning):

First database query

  timeclockinfo = TimeClock.query .filter_by (parent_id = current_user.parent_id, user_id = current_user.user_id, off = 1) .all () # I tuple data child_patient = ZIP (timeclockinfo, user_names, visit_dates) # I flask return render_template ( 'locationcheckinrpt.html', Provide data with form = form, child_patient = child_patient, timeclockinfo = timeclockinfo, searchForm = searchForm). . . # Template I have records {% hair in%} {{time in [0] .checkintime.strftime ( '% Y /% m /% d @% I:% M% p' about UTC Times could give me any advice [0]. browser performance and UTC time to time in Upyogkrtaon.   I have a user's time zone, so I saved the appropriate numbers.  

However, I can not stop my way through displaying it.

If your Have Dettaim and user's time zone, you have to apply for an make Detl object, the required computing, and then print the string.

If your question is actually a time zone to take a look at a passive daytime object, then:

  Pitajh import tz = timezone ( 'saved_user_timezone') datetime import from dt = saved_time_from_db locl_dt = tz.localize (dt datetime timezone)  

Time zone offset To display date time with the field, try:

  local_dt.replace (hour = local_dt.hour + int (local_dt.utcoffset () Total_seconds () / 3600)) local_dt.strftime ( 'Your format')  

Automapper is mapping incorrectly? -


I have two objects, the project is a DB unit and IPOZ, which I am trying to save from the database:

  Public Interface IPOJX {int ProjectID {get; Set; } String JobNumber {get; Set; } String JobName {get; Set; } String ProjectLocation {get; Set; } Int? FITAPID {Receive; Set; } Decimal? Charge {receives; Set; } Decimal? Manufacturing {get; Set; } Decimal? CostPerSquareFoot {get; Set; } Decimal? Squarefount {Get; Set; } Get String Memos { Set; } Date time? Date month {received; Set; } Ent JobStatusID {Received; Set; } Int ProjectTypeID {get; Set; }} // Heritage is actually in a partial orbit that does not get an override public partial class project: IPOject {public project} {this.ProjectContacts = new HashSet & lt; ProjectContact & gt; (); this. Project Consultants = New Hashet & lt; Project Consultant & gt; (); } Public int ProjectID {get; Set; } Public String JobNumber {get; Set; } Public String JobName {get; Set; } Public taps qualified & lt; Int & gt; FITAPID {Receive; Set; } Public taps qualified & lt; Decimal & gt; Charge {receives; Set; } Get Public Ink JobStatusID {Get; Set; } Public string memos {get; Set; } Public taps qualified & lt; Decimal & gt; Acreage {get; Set; } Public taps qualified & lt; Decimal & gt; Squarefount {Get; Set; } Public taps qualified & lt; Decimal & gt; Manufacturing {get; Set; } Public taps qualified & lt; Decimal & gt; Budget value {get; Set; } Public taps qualified & lt; Decimal & gt; {Get ActualPrice; Set; } Public taps qualified & lt; System.DateTime & gt; Date month {received; Set; } Public taps qualified & lt; Decimal & gt; CostPerSquareFoot {get; Set; } Public String ProjectLocation {get; Set; } Public int ProjectTypeID {get; Set; } Public taps qualified & lt; System.DateTime & gt; StartDate {Get; Set; } Public taps qualified & lt; Int & gt; PhaseID {Get; Set; } Public String ProjectDescription {get; Set; } Public taps qualified & lt; Int & gt; Architected {receive; Set; } Public taps qualified & lt; Int & gt; Manager ID {Receive; Set; } Public taps qualified & lt; Int & gt; ArchiveLocationID {Receive; Set; } Public virtual iconenging & lt; Project Contact & gt; Get ProjectContacts { Set; } Public Virtual Feat Type Feet {get; Set; } Public Virtual Job Stuti Jobstattu {Get; Set; } Public virtual iconenging & lt; Project Consultant & gt; Get project consultants; Set; } Public Virtual Person (Received; Set; } Public Virtual Storage Location Transfer {Received; Set; } Public Virtual Person Person1 {get; Set; } Public virtual phase step {received; Set; } Public Virtual Project Type Project Type {get; Set; }}  

My map has been created with me:

  Mapper Createmap & lt; IPOjet, Data Project & gt; ();  

But for any reason whenever I call the map:

  // MappingSyear is a cover that I'm all set around Automapor so that I Var will add to the project = _mappingService.Map & lt; IProject, Data.Project & gt; (request);  

I get this error:

  Missing map mapping or unsupported mapping mapping type: runtime type - & gt; Feet type system Runtime Type - & gt; Renaissance.Data .FilePoint Destination Path: Project.fitipefitip Source Value: System.Discam  

I am trying to do this. Name match and even if I tell it specifically with the map:

  .mail (dest => dest.fee, opt => opt.MapFrom (Src = & gt; src.Fee))  

This is still the error with the same message

UPDATE < / Strong> This works:

  .mmm (dest = & gt; dest.FyType, Opt => opt.Ignore ());  

I think it's a hack that I need to do this. I should not ignore the property that does not exist / source is not something similar to the property.


ios - Custom Cell images are changing on their own in a UITableView -


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

  • 3 जवाब

मेरे पास तालिका दृश्य है कस्टम कक्ष प्रत्येक सेल में एक छवि, शीर्षक, और विवरण होता है। जब मैं पहली बार टेबल को लोड करता हूं, तो यह ठीक ठीक है। अगर मैं धीरे-धीरे छवियों को खिसकाता हूं, तो भी ठीक काम करने लगता है। जैसे ही मैं तेजी से नीचे स्क्रॉल (जैसे कोशिकाओं की संख्या संभालने के लिए पर्याप्त नहीं है ऊपर और नीचे स्क्रॉल किए बिना फिट) छवियों को एक यादृच्छिक क्रम में कोशिकाओं को बदलने के लिए शुरू कुछ कोशिकाओं में एक ही छवि दो बार है।

किसी भी सुराग क्यों यह हो रहा है

  - (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath {स्थिर NSString * CellIdentifier = @ "सेल"; बुकमार्ककेलदृश्यदर्शिका * सेल = [तालिकादृश्य] डेक्यूवर पुन: प्रयोज्य सेल विथआईडेंटिफायर: इंडीडेपैथ के लिए सेलआईडेंटिफाइड: इंडेक्सपाथ]; समाचार लेख * currArt = [स्वयं। LN_Dept ऑब्जेक्टऐटइंडेक्स: इंडेक्सपाथ.रो]; अगर (currArt.artImage == शून्य) {अगर ([currArt.mainImage_URL rangeOfString: @ "& lt; img src ="]।! स्थान = NSNotFound) {NSRange रेंज = [currArt.mainImage_URL rangeOfString: @ "& lt; img src = \ "/ CONC /"]; NSString *-स्ट्रिंग = [[currArt.mainImage_URL substringFromIndex: NSMaxRange (रेंज)] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]]; NSRange सीमा 2 = [सबस्ट्रिंग rangeOfString: @ "\" "]; NSString * substring2 = [[सबस्ट्रिंग substringToIndex: NSMaxRange (सीमा 2) -1] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]]; NSString * imageURL = [PUB_URL स्ट्रिंगअपने स्ट्रिंगिंग: substring2]; [स्वयं डाउनलोड इमेज विथ url: [एनएसड URL यूआईआरथ्रस्ट्रिंग: छवि यूआरएल] समापनबैंक: ^ (बूल सफल हुआ, यूआईमेज * इमेज) {अगर (सफल) {currArt.artImage = image; Cell.ArtDisplayImage.image = currArt.artImage; }}]; }} और {cell.ArtDisplayImage.image = currArt.artImage; } [सेल कॉन्फ़िगर सेलफ्रेंटएन्टर: करर्ट आर्टिकल]; रिटर्न सेल; } - (शून्य) downloadImageWithURL: (NSURL *) यूआरएल completionBlock: (शून्य (^) (BOOL सफल रहा, UIImage * image)) completionBlock {NSMutableURLRequest * अनुरोध = [NSMutableURLRequest requestWithURL: यूआरएल]; [NSURLConnection sendAsynchronousRequest: अनुरोध कतार: [NSOperationQueue mainQueue] completionHandler: ^ (NSURLResponse * प्रतिक्रिया, NSData * डेटा, NSError * त्रुटि) {if {UIImage * image = [[UIImage alloc] initWithData (त्रुटि!): डेटा]; completionBlock (हाँ, छवि); } और {पूरा बॉल (नं, शून्य); }}]; }  

ऐसा इसलिए होता है क्योंकि आपको यह समझ में नहीं आता कि कैसे UITableView काम करता है मान लीजिए कि आपके तालिका दृश्य में 100 कोशिकाएं हैं और यह एक साथ 10 कोशिकाओं को प्रदर्शित कर सकती हैं। जब तालिका दृश्य लोड होता है, तो यह आपके कक्षों के 10 उदाहरण बनाता है। जब आप तालिका दृश्य के माध्यम से नीचे स्क्रॉल करना शुरू करते हैं तो यह वास्तव में आपके कक्षों के नए उदाहरणों को नहीं बनाता है - यह स्क्रीन से गायब हो जाने वाले पुनः उपयोग की गई कोशिकाओं (क्योंकि आप [tableView dequeueReusableCellWithIdentifier: CellIdentifier forIndexPath: indexPath]; )। इसका मतलब यह है कि सूचकांक 10 में सेल का एक ही संदर्भ होगा जो कि सूचकांक 0 पर सेल होगा। आपके प्रश्न पर वापस आप

  [self downloadImageWithURL: [NSURL URLWithString: ImageURL] पूर्णताः लॉक: ^ (बुल सफल, यूआईमेज * छवि) {if (सफल) {currArt.artImage = image; Cell.ArtDisplayImage.image = currArt.artImage; }}];  

यदि छवि को तेज़ी से डाउनलोड किया गया था तो सेल का पुन: उपयोग किया गया था (जो तब होता है जब आपका धीरे-धीरे स्क्रॉल हो रहा है) सब कुछ ठीक हो जाएगा। लेकिन अगर सेल को फिर से उपयोग किया गया था इससे पहले छवि डाउनलोड की गई थी, तो स्मृति में दो ब्लॉक हैं जो उस सेल के लिए चित्र डाउनलोड कर रहे हैं इस मुद्दे को हल करने के लिए मैं आपको यह परिस्थिति स्वचालित रूप से प्रबंधित करने या स्क्रीन से गायब होने वाले सेल के लिए छवियों को डाउनलोड करने के लिए उपयोग करने की सलाह देता हूं। आशा है कि इससे मदद मिलेगी।


c - Code vulnerability -


As a learning exercise, I have a weakness in the following code snippet to gain access to the executable owner. I'm trying to find

geteuid (), geteuid (), gateuid ()); System ("/ usr / bin / id");

FWI, I can not see anybody, I know Setresuid will set the file owner to UID, but I can not change the owner to anyone, but myself. I tried to redirect the path and redirect the id command, but since it uses a full path, that move does not work. It is possible to take advantage of an obscure (and now compromise) issue related to the use of signals. << / p>

centersuid () :

  1. Linux 2.6 and later, setresuid () may fail if the process is a RLIMIT_NPROC (which is, with a limit on the number of processes defined by ulimit -n ), there will be a lot more process in the target UID if the setresuid ( ) Got the fruit

    However, under Linux 3.1 and later, a flag determines the process of failing setresuid () , such as execve () Call will fail setresuid () Once the failed, system () can be stopped from running on any modern Linux.

  2. As long as some large references that have been omitted, they may be possible to set environment variables (e.g., LD_PRELOAD ), which Causes the insertion of code / usr / bin / id These variables are ignored for set execution capabilities, but by a set executable running here > The executable to be launched will not be ignored.

If you are on a weak system (Linux 2.6 to 3.0), then you can use this variable to set the environment variable and setresuid () May be able to take advantage, so that / usr / bin / id runs the user-specified code in the form of a root.


visual studio - Can I automatically generate a change script using a .scmp file? -


We are using database projects for our deployment on work and production servers, running our current process manually Has been saved for one Compare the SCMP file that compares the database project to our production database (using read only access), then produces a SQL script that we give to our IT man's support to run the production. We also create one to prepare the post deployment script, and we also give it to run with us.

I try to automate this process as much as possible (to reduce the likelihood of mistakes and make it more efficient) I want to know that the use of predefined options in our SSPM file There is a way to automatically generate a SQL Conversion Script while doing it.

In addition to this, automatically add an easy way to add post-deployment to script at the end of the schema conversion script, so there is only one SQL file to run it?

Perhaps there is a way to do the whole thing with powers or something.

OK what you should do is use sqlpackage.exe to create your script from dacpac Which is produced by the creation of the ssdt project.

Create a batch script to call it or make it a part of your CI process.

There are a few new options for filtering out the output such as the Ssdt released in the latest type (March 2015) or use a deployment filter such as:

If you need more flexibility .

Using this, you can filter the deployment as a comparison and pre / post posted script is pre / attached, then you kill two BIs with a stone RDS! Ad


install different version of perl module using perl brew -


We are using perlbrew to maintain different versions of perl. Together, we are now facing challenges because we need to update the script in the latest CPAN module.

Each version separates "post-text" itemprop = "text">

perlbrew , include its CPAN module if you run:

  perl - E'say @INC 'for  

You will see the Pearl version in the path. If you change the Pearl, you will see different paths for @INC .


osx - Mac OS X Active Directory tools -


I'm looking into the Active Directory tool for Mac, and what you can edit in the command line. There is little fear of reading, so if you enjoyed it, it would be nice.

First of all, you can create / update an app by creating AD or AD

Secondly, does anyone know or use an app to know this is?

I'm managing the engine's Eddie Manager Plus, but I know that you can unlock at least accounts using the app (Edi iPhone App Support)

< / Div>

Eddie Helpdesk do you do the same kind of stuff that AIDS support does with iOS, maybe more.

I have not really given much support to the ED. E. There is also an OSX desktop version in the Helpdesk which has some limited functionality, although there are not many such options on the ISX (and this is not a command line tool) on the ISO.

If you actually have a strong command line solution Check out

You can do anything you want to use the command line tool, create users, change attribute Areas are. You name it, it can possibly be done


javascript - How to add third party reporter in mocha? -


I want to add a third party reporter to Mocha

A reporter below it in the above link Has been asked to select:

  var mocha = new mocha ({ui: 'tdd', reporter: 'exit'});  

Xuyant comes in bundle with the spell. Now I want to add 'Istanbul' or 'LCOV' reporter to add to Mocha. How can I do this?

You must first establish your correspondent through NMP if you have installed the Mocha globally. , Then you have to install your reporter globally.

  Install npm mocha-lcov-reporter -g  

Then, to add the path to your reporter in the job:

  var mocha = new mocha ({ui: 'tdd', reporter: './node_modules/mocha-lcov-reporter'});  

I have not tried this example, but I think it works.


ios - Show taken images from camera in a ScrollView -


I have a simple application with just one button. When the user clicks on it, he can take a picture, click "don" in the camera and then save it and view it on scrollview.

However, when he is taking another picture and clicks on "finished" in the camera, the new picture overwrites the previous one and only he can see the picture that he has taken .

I want to save all these pictures and if users take 4-5 pictures, they can scroll through them.

This is my code, I'm not sure why this is not working.

  - (IBTAP) Camera: (ID) Sender {UIImagePickerController * Picker = [[UIImagePickerController alloc] init]; Picker.delegate = self; Picker.allowsEditing = Yes; Picker.sourceType = UIImagePickerControllerSourceTypeCamera; [Self present ViewController: animated picker: yes complete: zero]; } - (Zero) Image Picture Controller: (UIImagePickerController *) Picker didFinishPickingMediaWithInfo: (NSDictionary *) Information {NSMutableArray * images = [NSMutableArray arrayWithCapacity: [information count]]; ([_scrollView subviews] in UIView * v) [[v removeFromSuperview]; } [Self-captured scene controller permission: Yes complete: zero]; UIImage * image = [info valueForKey: @ "UIImagePickerControllerEditedImage"]; UIImageWriteToSavedPhotosAlbum (image, zero, zero, zero); UIImageView * imageview = [[UIImageView alloc] initWithImage: Image]; [Add _scrollViewSubview: image view]; [Images object: image]; Self.chosen Images = Pictures; UIImageWriteToSavedPhotosAlbum (image, zero, zero, zero); [_scrollView set paging is enabled: Yes]; }  

And I have an array of selected images in the title

@ Property (Nonatomic, Copy) NSArray * Selected Images;

Many things in your code are wrong Every time a user takes an image, you can see your scroll view Remove all the subviews from, then only add one selected image.

You have an array of selected images that you can use to place all the selected images, but you replace it with a new array of images, which includes only a single selected image

Allocate images to you as an unstable array with sufficient capacity to calculate the information dictionary you receive, but there is no point in doing this. The counting dictionary of that dictionary is going to be the number of key / value pairs, which does not reflect the number of images selected by the user (I believe the number of images selected by the user will always be 1, the different formats Ignore the original image and (potentially) like the edited image.)

I leave the previous images in my scroll view, the number of those pictures and the playmap To track, and scroll, just suggest adding a new image after the user has picked up.

You can think of using a UIPageViewController in page scroll mode instead of a scroll view. It manages paged scrolling better than Scrollview, is a sample app from Apple that supports tile rendering of images, supports pinch-to-zoom and panning around an image. It will be very easy to stitch the code in your app to handle images. (You can not decide to deal with tiled images - I have optimized the photocroller code with touch supported image support, in the client project, and generating image tiles is an appropriate job.)


ios - Init viewcontroller in app delegate, including tableview delegates -


I have a view controller class in your application:

  class ViewController: UIViewController, UITableViewDataSource , UITableViewDelegate {@Iboutlet weak var usersTable: UITableView! Var pending request: FBCAF? Var pendingLoginForSlot: Int! Var User ID: String? Bridesmaid swipeGesture: viewDidLoad () function bool = false override {super.viewDidLoad () usersTable.delegate = self usersTable.dataSource = self self.pendingLoginForSlot = -1 self.usersTable.tableFooterView = UIView (frame: CGRectZero)}  

I want to function in this view controller starts and fully didFinishLaunchingWithOptions when I like apps representative after defining the sequence controller your application delegate:

  var VC: ViewController = ViewController ()  

VC.usersTable no Is equal. But when I do my function after viewDidLoad everything is working fine.

Then how can I activate the application representative from within (such as those that are defined in the logging tableview) and such properties are available that viewDidLoad expect the same results to define I load it via a tab barcontroller after loading a regular manner VC?

Thank you!


javascript - ng-repeat isn't iterating over array -


सरलीकृत HTML:

  & lt; div ng-repeat = "स्थानांतरण में स्थानांतरण" & gt; & Lt; तालिका वर्ग = "तालिका" & gt; & LT; thead & gt; & LT; टीआर & gt; & Lt; th अनुवाद & gt; विवरण {{transfer.entries | | Json}} & lt; / th & gt; & Lt; / टीआर & gt; & Lt; / thead & gt; & LT; tbody & gt; & Lt; tr ng-repeat = "transfer.entries में प्रविष्टि" & gt; & Lt; td & gt; {{entry.description}} & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt; & Lt; / div & gt;  

सरलीकृत जेएस:

<पूर्व> $ scope.transfers = स्थानांतरण; $ Scope.total = transfers.meta.count; (Var i = 0, j = $ scope.transfers.length; i & lt; j; i ++) {यदि (! $ Scope.transfers [i] .hasOwnProperty ('प्रविष्टियों')) {$ scope.transfers [i] ['प्रविष्टियों'] = []; } $ Scope.transfers [i] ['प्रविष्टियों']। पुश ({विवरण: 'एक विवरण'}); }

पहला {{transfer.entries}} (जो कि "विवरण" के दाईं ओर है) स्थानांतरण के लिए सही मान दिखाता है [I] .entries , जैसे कुछ [["विवरण": "एक विवरण"}] , लेकिन किसी कारण से एनजी-दोहराने उस सरणी पर नहीं चलती है।

  • वे एक ही दायरे पर हैं।
  • नियमित बाध्यकारी ठीक से काम कर रहा है।
  • एनजी-दोहराने लगता है

तो, मैं क्या कर रहा हूँ गलत?

ठीक है, ऐसा लगता है कि मैं एक बग में दुर्घटनाग्रस्त हो गया।

कठिन हिस्सा यह निर्धारित करना था कि इस मुद्दे के साथ एक निर्देश था।

आपके समय के लिए धन्यवाद।


shell - Get lines from a specific date afterwards/backwards -


I am working on a shell script. I should get the lines that contain the old information from or from that day. Each line in the file is a record and the first line is old, the last is the latest file contains:

some information \ t date \ t other information

If I fix the given date only, then I think what I am looking for but only that will be the presence of that date in the file. I get the last chance and get the lines from the beginning of the file. I tried awk, but I was completely unsuccessful. This should give me every line that is on or before that date. My failure and last attempt:

awk '$ 1 & lt; = "2015/03/17" '

So I need something like this, gives me all the lines with the date of 2015/03/15 or older, It has to be disturbed and 2 dates have to be compared, according to it's old?

should be very easy because the date format you use should be compared to the letter ..

file: test.txt

  one 2015/03/17 BC 2015-03-12 to 04/04/02/10 FG 2016/01  

Awk command:

  awk -vd = "2015/03 / 15" '{if ($ 2 & lt; = d) {Print $ 0}} 'test.txt  

Just change the date value D = you want.