Posts

c# - Retrieve two values in the same linq query -

I am starting with linqToSql and I still have some questions in making my queries. For example, I want to get an integer with two values, a subset of elements, and count of elements in the same query. In this way I have done it separately: integer elements; IEnumerable & LT; ClsTax & gt; result; Outcome = (Select new ClsTax {tax = T.TX1, increase = TNRCTs} from T. db.tax Take (25); Total Elements = (Select the new ClsTax {tax = t.tax1, increase = t.increase} from db.tax). Calculation (); As you can see, I can not use results.count () because I only used Tech (25) to get the first 25 elements, and I It is to know how many elements are thanks post text "itemprop = "Text"> How about: var all = (Choose from db.tax to select new claxex in te {tax = ttx1, increase = increase t}); Var calculation = all.Count (); Var results = all.Take (25); A little easier?

sql - Delete all table data in a set [DB].[audit].[tables] -

So, I have a database with about 100 audit tables and I want to prefix them in 1 SQL query. There are 2 set tables in the database [Audit] and [DBO] I am also not convinced that these groups of tables should be called so that finding any results from Google is proving difficult. Any suggestions? You can find all the tables with a certain schema name such as: name from sys.tables where schema_name (schema_id) = 'audit' With a cursor, you iterate over those tables, and empt it by using: Declare Usage DB Declare @ Query Morality (max) @ Tablename nvarchar (maximum) Declared @curs cursor select from sys.tables @curs = for cursor = cursor where schema_name (schema_id) = 'Audit' open @ Incurred @ bring @tablename circle time @@ FETCH_STATUS = 0 begin set @ query = Antrenket table audit. Close the @tablename end @tablename exec sp_executesql @query fritter @ circus @curs deallocate @curs If you want to delete tables instead, use this: set @query = N...

javascript - Duplicate Flex Object in HTML without Re-Initializing -

I am creating a flash object that lifts up some heavy images. What I'm going to do is, to move an image, load many flash objects on the same page, modify it, and display it in the Flash object. The problem I am facing is that when I try to add 100 Flex objects on the page, the browser freezes because it attempts to reload / initialize each instance. Once all of them are loaded, then the processing of the images goes quickly. Does anyone know how to duplicate a flash piece without reloading everything? Another thought I would have is to load the image in a flex object, and it is to modify the image tag using an MFTL / Data URI. Any ideas? The answer I came up with is using it. I send the image to a single flash object, does it run pixel bend scripts and then output the base 64 image string to the data URI on the image tag. For IE, who does not support this scheme, I will output the string to a php script which will return the decoded image. The reason for this is th...

Objective-C: what is private what is not? -

लोग प्रयोग क्यों कर रहे हैं @interface ViewController: UIViewController {@private UIButton * button_; } सार्वजनिक हेडर में निजी घोषणाएं? एक कार्यान्वयन के भीतर एक चर को घोषित करते हुए एक ही परिणाम पैदा होता है, है ना? यह मेरे लिए अजीब लगता है, मैंने सोचा था कि सार्वजनिक शीर्ष लेख में केवल वास्तव में सार्वजनिक सदस्य ही शामिल होना चाहिए। संरक्षित सदस्यों के साथ क्या करना है? @implementation ViewController UIButton * button_; @end फर्क सिर्फ इतना है कि यह चर केवल वर्तमान संकलन इकाई (.m फ़ाइल, सही?) के भीतर दिखाई देता है क्या ऐसा ही है तरीकों के लिए सही पकड़? मैं उचित तरीके से आदेश या आगे घोषणाओं के साथ ठीक संकलन कर सकता था लोगों को निजी तरीकों के लिए श्रेणियां घोषित करने की क्यों परवाह है? केवल परीक्षण प्रयोजनों के लिए? @implementation ब्लॉक के भीतर परिवर्तनीय घोषणा एक वैश्विक चर पैदा करेगा, और नहीं एक उदाहरण चर उदाहरण चर को @interface के भाग के रूप में परिभाषित करने की आवश्यकता होती है। जब आप कोई अतिरिक्त @interface ब्लॉक बना सकते हैं, तो एक श्रेणी के माध्यम से ...

Maven WAR plugin not reading configuration when running in <execution> tag -

I'm trying to hang Maven with a war plug-in for many. It works fine until it is defined in the following manner: & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 1.0 & lt; / Version & gt; & Lt; Configuration & gt; (...) & lt; / Configuration & gt; but not in the following & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 1.0 & lt; / Version & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; Step & gt; Package & lt; / Step & gt; & Lt; Configuration & gt; (...) & lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & ...

Python: Extracting data from buffer with ctypes -

I am able to call a function successfully with ctypes in Python. I now have a buffer that is full of data structure that I want to remove. What is the best strategy for this? Function: class list (): def __init __ (self): # [...] def getdirentries (self, path): self.load_c () Self.fd = os.open (path, os.O_RDONLY) self.statinfo = os.fstat (self.fd) self.buffer = ctypes.create_string_buffer (self.statinfo.st_size) nbytes = self.statinfo .st_size transferred_bytes = self .libc.getdirentries (self.fd, ctypes.byref (self.buffer), nbytes, ctypes.byref (self.basep)) # [...] structure: class dirent (ctypes.Structure): _fields_ = [("d_fileno", ctypes.c_uint32), # / * file number of entry / ("d_reclen", ctypes.c_uint16), this record The length of the string in the # / * length * / ("d_type", ctypes.c_uint8), # / * file type * / ("d_namlen", ctypes.c_uint8), # / * d_name * / ("D_name", ctype S.c_char * (MAXNAMELEN + 1))] Some out...

JQuery SelectToUISlider Issues -

Hopefully this has not already been asked as a slider question, but already asking me questions No answers found So, here goes: I have a SelectToUISlider () which is basically a modified JQuery UI slider, and I'm using a range value. So, I start with a handle of 60, and the other 100 (0 to 100 on the scale). What do I have to do, click on a radio button, so that 0 can change to 100 and convert to 100. I have failed to convert it through jQuery selectors / javascript. However, while switching the handle to move the handle, it works, but the second handle (in 100) moves back to 0 in the first handle (60), so it does not seem to be. I think I may have to delete the slider and it may need to be rebuilt with the second handle (which starts as 100), in this scenario 0 can be the first handle (although I can destroy it And it does not seem to answer that either.) The one which I have tried here does not work till now: As now, nothing happens when clicking on the radio button, bu...