Search Results

Search found 274 results on 11 pages for 'graham powell'.

Page 3/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Adding Static IP's to the NIC

    - by Brett Powell
    We are currently working on migrating a lot of new machines to our network, and my job this morning was to setup all of the IP Addresses. I worked on this all morning, and when I got back tonight I was informed that they had all been setup incorrectly, and had to be removed and re-added. I am quite confused as I have been setting up IP's on machines for a long time and I am curious as to what the issue is. Just taking into account this example... 72.26.196.160/29 255.255.255.248 A /29 block is 5 usable IP's. With the script I wrote and used, the IP Addresses .162 - .166 were added to the NIC. I can't remember now what the name for .161 was, but isn't it the broadcast address or something which isn't assigned to the NIC when adding additional IP Blocks? I am curious as to where my logic is failing me. Not to mention even if .161 was to be added, there is no reason why all of the IPs would have to be removed, as .161 could just be added in addition to these.

    Read the article

  • Is there a tool that can test what SSL/TLS cipher suites a particular website offers?

    - by Jeremy Powell
    Is there a tool that can test what SSL/TLS cipher suites a particular website offers? I've tried openssl, but if you examine the output: $ echo -n | openssl s_client -connect www.google.com:443 CONNECTED(00000003) depth=1 /C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA verify error:num=20:unable to get local issuer certificate verify return:0 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com i:/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA 1 s:/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority --- Server certificate -----BEGIN CERTIFICATE----- MIIDITCCAoqgAwIBAgIQL9+89q6RUm0PmqPfQDQ+mjANBgkqhkiG9w0BAQUFADBM MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg THRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBDQTAeFw0wOTEyMTgwMDAwMDBaFw0x MTEyMTgyMzU5NTlaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh MRYwFAYDVQQHFA1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKFApHb29nbGUgSW5jMRcw FQYDVQQDFA53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC gYEA6PmGD5D6htffvXImttdEAoN4c9kCKO+IRTn7EOh8rqk41XXGOOsKFQebg+jN gtXj9xVoRaELGYW84u+E593y17iYwqG7tcFR39SDAqc9BkJb4SLD3muFXxzW2k6L 05vuuWciKh0R73mkszeK9P4Y/bz5RiNQl/Os/CRGK1w7t0UCAwEAAaOB5zCB5DAM BgNVHRMBAf8EAjAAMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwudGhhd3Rl LmNvbS9UaGF3dGVTR0NDQS5jcmwwKAYDVR0lBCEwHwYIKwYBBQUHAwEGCCsGAQUF BwMCBglghkgBhvhCBAEwcgYIKwYBBQUHAQEEZjBkMCIGCCsGAQUFBzABhhZodHRw Oi8vb2NzcC50aGF3dGUuY29tMD4GCCsGAQUFBzAChjJodHRwOi8vd3d3LnRoYXd0 ZS5jb20vcmVwb3NpdG9yeS9UaGF3dGVfU0dDX0NBLmNydDANBgkqhkiG9w0BAQUF AAOBgQCfQ89bxFApsb/isJr/aiEdLRLDLE5a+RLizrmCUi3nHX4adpaQedEkUjh5 u2ONgJd8IyAPkU0Wueru9G2Jysa9zCRo1kNbzipYvzwY4OA8Ys+WAi0oR1A04Se6 z5nRUP8pJcA2NhUzUnC+MY+f6H/nEQyNv4SgQhqAibAxWEEHXw== -----END CERTIFICATE----- subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com issuer=/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA --- No client certificate CA names sent --- SSL handshake has read 1777 bytes and written 316 bytes --- New, TLSv1/SSLv3, Cipher is AES256-SHA Server public key is 1024 bit Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : AES256-SHA Session-ID: 748E2B5FEFF9EA065DA2F04A06FBF456502F3E64DF1B4FF054F54817C473270C Session-ID-ctx: Master-Key: C4284AE7D76421F782A822B3780FA9677A726A25E1258160CA30D346D65C5F4049DA3D10A41F3FA4816DD9606197FAE5 Key-Arg : None Start Time: 1266259321 Timeout : 300 (sec) Verify return code: 20 (unable to get local issuer certificate) --- it just shows that the cipher suite is something with AES256-SHA. I know I could grep through the hex dump of the conversation, but I was hoping for something a little more elegant. I would prefer Linux tools, but Windows (or other) would be fine. This question is motivated by the security testing I do for PCI and general penetration testing. Update: GregS points out below that the SSL server picks from the cipher suites of the client. So it seems I would need to test all cipher suites one at a time. I think I can hack something together, but is there a tool that does particularly this?

    Read the article

  • Throttle CPU Usage consumed by Process

    - by Brett Powell
    We run a game-server company where we basically have large amounts of customers sharing a single machine, and are just on their own instance of a Java Process (Minecraft) managed by our Web Control Panels. In the last few game updates released, we have noticed that many of the third-party plugins our customer's use have become poorly written and we are frequently seeing huge CPU increases from certain servers until we manually kill the process. Our Game Panel automatically restarts processes, so killing them is not really an issue. Our problem is that once once of these servers starts consuming 50%+ CPU Usage, it takes atleast 5 minutes to RDP into the machine, locate who it belongs to, shut it down and notify them. Are there any current solutions for Server 2008 which allow for the throttling of CPU usage or worst case, just auto kill a process stuck using that much? As Minecraft is essentially a single-threaded application, we have investigated using Affinity, although with the variations in our Packages and fluctuations in usage, this doesn't work well for us. Some option to throttle the maximum usage a process can use would be perfect, or at least the option to kill a process using that much. Thanks!

    Read the article

  • Setting up a Pagefile and Partition in Server 2008

    - by Brett Powell
    I am setting up 18 new machines for our company, and I have instructions from my new boss on setting up a Pagefile and Partition. I have looked at their existing machines to base the new setups off of, but there is no consistency between any 2 machines, which has left me extremely frustrated to say the least. My instructions are... 1) Set a static pagefile (use recommended value as max/min), set it on SSD if SSD available. 2) Make 3 partitions: C: is used for OS and install files D: is used for backups on machines with a SSD. On machines without SSD create a D: partition for pagefile (2*installed RAM for partition size) E: must be the partition hosting user files I have never messed with Pagefiles before, and looking at their existing machines is offering no help. My questions are... 1) As the machines I am setting up have no SSD (just 2 SATA drives) does it sound like the Pagefile should be setup on the C: (primary) drive or the D:? The instructions are vague so I have no idea. 2) As C: and D: are both Physical drives, does it sound like C: should be partitioned out to create the E: drive or D:? Thanks for any help I can get. I am extremely stressed out under a massive workload right now, and these vague instructions are quite infuriating.

    Read the article

  • securing source code with bitlocker

    - by Daniel Powell
    We need to deploy a web based application at a client site where it will be within their local intranet. Part of our requirement is to provide some basic security to protect our IP. I realise that nothings a 100% guaranteed fix but we are just looking to make it a bit harder for most people. The server will be running server 2008 and I was considering using bitlocker as a cheap and nasty way to protect it. From what I understand assuming the mobo supports it we can use the Transparent bitlocker mode and this means that moving the hdd to another pc will mean the hdd will be unreadable in that machine baring some sort of cold boot attack to steal the encryption keys. Is this assumption correct and in the case that the motherboard or any other component fails in the pc and we need to replace it do we lose access to our data or is there a way to unencrypt it (obviously accessible to only our company) EDIT: we do have legal documents that cover this and we will be locking the pc physically and the client will not have access to the pc (windows login) other than via the website we host on it

    Read the article

  • esxi change MKS port

    - by Daniel Powell
    I need to connect to my home esxi box over the web however I cannot use the default port 902 for the console viewer due to firewall restrictions. Is there a way to change this port somewhere even if i can just do some nat and redirect any other port to that port? I've had a look around and when I try to connect to the esxi server in vSphere client I cant find anywhere I can specify the port. I know this is not the recommended way to do this but its a testing server and security is not an absolute must on this box. I also cannot setup a vpn to this box.

    Read the article

  • Is there a tool that can test what SSL/TLS cipher suites a particular website offers?

    - by Jeremy Powell
    Is there a tool that can test what SSL/TLS cipher suites a particular website offers? I've tried openssl, but if you examine the output: $ echo -n | openssl s_client -connect www.google.com:443 CONNECTED(00000003) depth=1 /C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA verify error:num=20:unable to get local issuer certificate verify return:0 --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com i:/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA 1 s:/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority --- Server certificate -----BEGIN CERTIFICATE----- MIIDITCCAoqgAwIBAgIQL9+89q6RUm0PmqPfQDQ+mjANBgkqhkiG9w0BAQUFADBM MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg THRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBDQTAeFw0wOTEyMTgwMDAwMDBaFw0x MTEyMTgyMzU5NTlaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh MRYwFAYDVQQHFA1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKFApHb29nbGUgSW5jMRcw FQYDVQQDFA53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC gYEA6PmGD5D6htffvXImttdEAoN4c9kCKO+IRTn7EOh8rqk41XXGOOsKFQebg+jN gtXj9xVoRaELGYW84u+E593y17iYwqG7tcFR39SDAqc9BkJb4SLD3muFXxzW2k6L 05vuuWciKh0R73mkszeK9P4Y/bz5RiNQl/Os/CRGK1w7t0UCAwEAAaOB5zCB5DAM BgNVHRMBAf8EAjAAMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwudGhhd3Rl LmNvbS9UaGF3dGVTR0NDQS5jcmwwKAYDVR0lBCEwHwYIKwYBBQUHAwEGCCsGAQUF BwMCBglghkgBhvhCBAEwcgYIKwYBBQUHAQEEZjBkMCIGCCsGAQUFBzABhhZodHRw Oi8vb2NzcC50aGF3dGUuY29tMD4GCCsGAQUFBzAChjJodHRwOi8vd3d3LnRoYXd0 ZS5jb20vcmVwb3NpdG9yeS9UaGF3dGVfU0dDX0NBLmNydDANBgkqhkiG9w0BAQUF AAOBgQCfQ89bxFApsb/isJr/aiEdLRLDLE5a+RLizrmCUi3nHX4adpaQedEkUjh5 u2ONgJd8IyAPkU0Wueru9G2Jysa9zCRo1kNbzipYvzwY4OA8Ys+WAi0oR1A04Se6 z5nRUP8pJcA2NhUzUnC+MY+f6H/nEQyNv4SgQhqAibAxWEEHXw== -----END CERTIFICATE----- subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com issuer=/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA --- No client certificate CA names sent --- SSL handshake has read 1777 bytes and written 316 bytes --- New, TLSv1/SSLv3, Cipher is AES256-SHA Server public key is 1024 bit Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : AES256-SHA Session-ID: 748E2B5FEFF9EA065DA2F04A06FBF456502F3E64DF1B4FF054F54817C473270C Session-ID-ctx: Master-Key: C4284AE7D76421F782A822B3780FA9677A726A25E1258160CA30D346D65C5F4049DA3D10A41F3FA4816DD9606197FAE5 Key-Arg : None Start Time: 1266259321 Timeout : 300 (sec) Verify return code: 20 (unable to get local issuer certificate) --- it just shows that the cipher suite is something with AES256-SHA. I know I could grep through the hex dump of the conversation, but I was hoping for something a little more elegant. I would prefer Linux tools, but Windows (or other) would be fine. This question is motivated by the security testing I do for PCI and general penetration testing. Update: GregS points out below that the SSL server picks from the cipher suites of the client. So it seems I would need to test all cipher suites one at a time. I think I can hack something together, but is there a tool that does particularly this?

    Read the article

  • Windows 2008 x64 displays SP1 when SP2 is installed

    - by Graham Powell
    After setting up a Windows 2008 x64 server (not R2), I installed a number of Microsoft updates. After installing these updates, the computer reports that it has SP1 installed, not SP2. I believe the culprit is KB917607, which allows Windows 2008 to display .hlp files. Now I have to upgrade Internet Explorer on this server, and it won't install without SP2. I am very leery about reinstalling SP2, as I have installed a large number of post-SP2 updates, and I've had issues after reinstalling SP2 in similar circumstances. How can I fix Windows so it reports the correct service pack?

    Read the article

  • sqlite no such table

    - by Graham B
    can anyone please help. I've seen many people with the same problem and looked at all suggestions but still cannot get this to work. I have tried to unistall the application and install again, I have tried to change the version number and start again. I've debugged the code and it does go into the onCreate function, but when I go to make a select query it says the users table does not exist. Any help would greatly be appreciated. Thanks guys DatabaseHandler Class public class DatabaseHandler extends SQLiteOpenHelper { // Variables protected static final int DATABASE_VERSION = 1; protected static final String DATABASE_NAME = "MyUser.db"; // Constructor public DatabaseHandler(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } // Creating Tables @Override public void onCreate(SQLiteDatabase db) { // Create the Users table // NOTE: I have the column variables saved above String CREATE_USERS_TABLE = "CREATE TABLE IF NOT EXISTS Users(" + KEY_PRIMARY_ID + " " + INTEGER + " " + PRIMARY_KEY + " " + AUTO_INCREMENT + " " + NOT_NULL + "," + USERS_KEY_EMAIL + " " + NVARCHAR+"(1000)" + " " + UNIQUE + " " + NOT_NULL + "," + USERS_KEY_PIN + " " + NVARCHAR+"(10)" + " " + NOT_NULL + ")"; db.execSQL(CREATE_USERS_TABLE); } // Upgrading database @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS Users"); onCreate(db); } UserDataSource class public class UserDataSource { private SQLiteDatabase db; private DatabaseHandler dbHandler; public UserDataSource(Context context) { dbHandler = new DatabaseHandler(context); } public void OpenWriteable() throws SQLException { db = dbHandler.getWritableDatabase(); } public void Close() { dbHandler.close(); } // Validate the user login with the username and password provided public void ValidateLogin(String username, String pin) throws CustomException { Cursor cursor = db.rawQuery( "select * from Users where " + DatabaseHandler.USERS_KEY_EMAIL + " = '" + username + "'" + " and " + DatabaseHandler.USERS_KEY_PIN + " = '" + pin + "'" , null); ........ } Then in the activity class, I'm calling UserDataSource uds = new UserDataSource (this); uds.OpenWriteable(); uds.ValidateLogin("name", "pin"); Any help would be great, thanks very much Graham The following is the attached log from the error report 11-23 17:47:46.414: I/SqliteDatabaseCpp(26717): sqlite returned: error code = 1, msg = no such table: Users, db=/data/data/prometric.myitemwriter/databases/MyUser.db 11-23 17:47:57.085: D/AndroidRuntime(26717): Shutting down VM 11-23 17:47:57.085: W/dalvikvm(26717): threadid=1: thread exiting with uncaught exception (group=0x40bec1f8) 11-23 17:47:57.171: D/dalvikvm(26717): GC_CONCURRENT freed 575K, 8% free 8649K/9351K, paused 2ms+6ms 11-23 17:47:57.179: E/AndroidRuntime(26717): FATAL EXCEPTION: main 11-23 17:47:57.179: E/AndroidRuntime(26717): java.lang.IllegalStateException: Could not execute method of the activity 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.view.View$1.onClick(View.java:3091) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.view.View.performClick(View.java:3558) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.view.View$PerformClick.run(View.java:14152) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.os.Handler.handleCallback(Handler.java:605) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.os.Handler.dispatchMessage(Handler.java:92) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.os.Looper.loop(Looper.java:137) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.app.ActivityThread.main(ActivityThread.java:4514) 11-23 17:47:57.179: E/AndroidRuntime(26717): at java.lang.reflect.Method.invokeNative(Native Method) 11-23 17:47:57.179: E/AndroidRuntime(26717): at java.lang.reflect.Method.invoke(Method.java:511) 11-23 17:47:57.179: E/AndroidRuntime(26717): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) 11-23 17:47:57.179: E/AndroidRuntime(26717): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) 11-23 17:47:57.179: E/AndroidRuntime(26717): at dalvik.system.NativeStart.main(Native Method) 11-23 17:47:57.179: E/AndroidRuntime(26717): Caused by: java.lang.reflect.InvocationTargetException 11-23 17:47:57.179: E/AndroidRuntime(26717): at java.lang.reflect.Method.invokeNative(Native Method) 11-23 17:47:57.179: E/AndroidRuntime(26717): at java.lang.reflect.Method.invoke(Method.java:511) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.view.View$1.onClick(View.java:3086) 11-23 17:47:57.179: E/AndroidRuntime(26717): ... 11 more 11-23 17:47:57.179: E/AndroidRuntime(26717): Caused by: android.database.sqlite.SQLiteException: no such table: Users: , while compiling: select * from Users where email = '' and pin = '' 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:68) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:127) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:53) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1685) 11-23 17:47:57.179: E/AndroidRuntime(26717): at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1659) 11-23 17:47:57.179: E/AndroidRuntime(26717): at projectname.database.UserDataSource.ValidateLogin(UserDataSource.java:73) 11-23 17:47:57.179: E/AndroidRuntime(26717): at projectname.LoginActivity.btn_login_Click(LoginActivity.java:47) 11-23 17:47:57.179: E/AndroidRuntime(26717): ... 14 more

    Read the article

  • Programming concepts taken from the arts and humanities

    - by Joey Adams
    After reading Paul Graham's essay Hackers and Painters and Joel Spolsky's Advice for Computer Science College Students, I think I've finally gotten it through my thick skull that I should not be loath to work hard in academic courses that aren't "programming" or "computer science" courses. To quote the former: I've found that the best sources of ideas are not the other fields that have the word "computer" in their names, but the other fields inhabited by makers. Painting has been a much richer source of ideas than the theory of computation. — Paul Graham, "Hackers and Painters" There are certainly other, much stronger reasons to work hard in the "boring" classes. However, it'd also be neat to know that these classes may someday inspire me in programming. My question is: what are some specific examples where ideas from literature, art, humanities, philosophy, and other fields made their way into programming? In particular, ideas that weren't obviously applied the way they were meant to (like most math and domain-specific knowledge), but instead gave utterance or inspiration to a program's design and choice of names. Good examples: The term endian comes from Gulliver's Travels by Tom Swift (see here), where it refers to the trivial matter of which side people crack open their eggs. The terms journal and transaction refer to nearly identical concepts in both filesystem design and double-entry bookkeeping (financial accounting). mkfs.ext2 even says: Writing superblocks and filesystem accounting information: done Off-topic: Learning to write English well is important, as it enables a programmer to document and evangelize his/her software, as well as appear competent to other programmers online. Trigonometry is used in 2D and 3D games to implement rotation and direction aspects. Knowing finance will come in handy if you want to write an accounting package. Knowing XYZ will come in handy if you want to write an XYZ package. Arguably on-topic: The Monad class in Haskell is based on a concept by the same name from category theory. Actually, Monads in Haskell are monads in the category of Haskell types and functions. Whatever that means...

    Read the article

  • Google I/O 2010 - The world of ListView

    Google I/O 2010 - The world of ListView Google I/O 2010 - The world of ListView Android 201 Romain Guy, Adam Powell ListView is one of the most widely used Android widgets but also the most complex one. Join us to learn how to master ListView and learn all about its features, optimizations, quirks and limitations. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 4 0 ratings Time: 59:43 More in Science & Technology

    Read the article

  • Making Sense of Multitouch

    [This post is by Adam Powell, one of our more touchy-feely Android engineers. — Tim Bray] The word “multitouch” gets thrown around quite a bit and it’s not...

    Read the article

  • Google I/O 2012 - Multi-Versioning Android User Interfaces

    Google I/O 2012 - Multi-Versioning Android User Interfaces Bruno Oliveira, Adam Powell This session will show you how to build user interfaces that work consistently across Android versions, from Eclair to today. We'll cover topics including the Action Bar, Fragments, style, size qualifiers, app structure, and navigation. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1533 51 ratings Time: 48:22 More in Science & Technology

    Read the article

  • Best way to get InnerXml of an XElement?

    - by Mike Powell
    What's the best way to get the contents of the mixed "body" element in the code below? The element might contain either XHTML or text, but I just want its contents in string form. The XmlElement type has the InnerXml property which is exactly what I'm after. The code as written almost does what I want, but includes the surrounding <body>...</body> element, which I don't want. XDocument doc = XDocument.Load(new StreamReader(s)); var templates = from t in doc.Descendants("template") where t.Attribute("name").Value == templateName select new { Subject = t.Element("subject").Value, Body = t.Element("body").ToString() };

    Read the article

  • Using WHMCS API with a C# .NET Application

    - by Brett Powell
    I just started taking a class on C# .NET and have found it really fascinating how simple it is. I have been using C++ for years, so the simplistic nature is actually hitting me as somewhat confusing. I would like to do something along these lines... http://wiki.whmcs.com/API:Example_Usage Would it be easy to do this from a C# .NET application, or would I still be in about the same boat as C++ (build libcurl, grab a bunch of other libs, etc)?

    Read the article

  • ScriptSharp ClockLabel example with 0.6.2

    - by Hugh Powell
    Hi folks, I'm developing in Visual Studio 2010 and I've just downloaded and installed Script# 0.6.2 for VS 2010. I'm trying to follow the clock example in the Read Me pdf but can't get it to compile. I've created a new Script# Class Library project inside my solution called Clock, renamed the .cs file to ClockBehaviour and added the following code as per the example: using System; using System.DHTML; using ScriptFX; using ScriptFX.UI; namespace Clock { public class ClockBehavior : Behavior { private int _intervalCookie; public ClockBehavior(DOMElement domElement, string id) : base(domElement, id) { _intervalCookie = Window.SetInterval(OnTimer, 1000); } public override void Dispose() { if (_intervalCookie != 0) { Window.ClearInterval(_intervalCookie); } base.Dispose(); } private void OnTimer() { DateTime dateTime = new DateTime(); DOMElement.InnerHTML = dateTime.Format("T"); } } } When I try and compile the project I get errors saying that the System.DHMTL, ScriptFX and ScriptFX.UI namespaces could not be found (and some others, but I guess by fixing these errors the others will fall out). It feels like I'm not referencing the correct projects/dlls. In the References for the project I have mscorlib and Script.Web. I've tried using the object browser find the classes (such as Behavior) in other namespaces but with no luck. I've added all of the .dlls from the ScriptSharp folder in Program Files but the namespaces still can't be found. Any help would be very much appreciated, Thanks, Hugh

    Read the article

  • Is it possible to run Visual Studio Database Edition schema migrations from the command line?

    - by Damian Powell
    Visual Studio 2008 Database Edition (Data Dude) has the ability to perform schema comparisons between databases and generate a script which migrates from one database to the other. Is it possible to perform this comparison and generate the migration script from the command line? If so, what are the command line tools, and are the same tools used in equivalent versions of Visual Studio 2010?

    Read the article

  • Challenge: Neater way of currying or partially applying C#4's string.Join

    - by Damian Powell
    Background I recently read that .NET 4's System.String class has a new overload of the Join method. This new overload takes a separator, and an IEnumerable<T> which allows arbitrary collections to be joined into a single string without the need to convert to an intermediate string array. Cool! That means I can now do this: var evenNums = Enumerable.Range(1, 100) .Where(i => i%2 == 0); var list = string.Join(",",evenNums); ...instead of this: var evenNums = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .Select(i => i.ToString()) .ToArray(); var list = string.Join(",", evenNums); ...thus saving on a conversion of every item to a string, and then the allocation of an array. The Problem However, being a fan of the functional style of programming in general, and method chaining in C# in particular, I would prefer to be able to write something like this: var list = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .string.Join(","); This is not legal C# though. The closest I've managed to get is this: var list = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .ApplyTo( Functional.Curry<string, IEnumerable<object>, string> (string.Join)(",") ); ...using the following extension methods: public static class Functional { public static TRslt ApplyTo<TArg, TRslt>(this TArg arg, Func<TArg, TRslt> func) { return func(arg); } public static Func<T1, Func<T2, TResult>> Curry<T1, T2, TResult>(this Func<T1, T2, TResult> func) { Func<Func<T1, T2, TResult>, Func<T1, Func<T2, TResult>>> curried = f => x => y => f(x, y); return curried(func); } } This is quite verbose, requires explicit definition of the parameters and return type of the string.Join overload I want to use, and relies upon C#4's variance features because we are defining one of the arguments as IEnumerable rather than IEnumerable. The Challenge Can you find a neater way of achieving this using the method-chaining style of programming?

    Read the article

  • Dangers of Windows API and Administrator accounts?

    - by Brett Powell
    I wrote a game server plugin last night that allowed me to create a user account and set it as administrator, which is a huge problem. Of course the simple fix is to create a basic user account with limited privileges for the game servers, so they would not have access to do things like this. I wanted to find out if there's anything else in the Windows API that would create such a huge vulnerability though? I guess I want to just make sure that when the client's game servers accounts are moved to limited access accounts, we won't have to worry about any of them using the windows API to sabotage the machines. There is already enough exploits in the game itself to worry about, without having to worry about client's taking over the machines with plugins lol. Some of the questions relative would be... Can you disable/enable Remote Desktop from c++? Can you get a list of AD user groups from c++? (not that a user belongs to, but a complete list)

    Read the article

  • WPF Issues with Control Layout

    - by Brett Powell
    I am making an application that connects to our billing software using its API, and I am running into a few issues getting the layout working properly. I want to make it so that when one of the expanders is minimized, the other window fills the gap, and when it is expanded again the other expander goes back to where it was. Right now when the arrow is clicked on one, there is just an empty gap. I used a DockPanel as the parent which I assumed would automatically do this, but it isn't working. Second question, is there a way to make these areas resizable? I don't want to try and get too frisky with allowing the user to undock the menus (don't even know if that is possible with just straight WPF) but it would be nice if they could change the width/height of them. Also, just a newbie question to C#, but what is the equivalent of a C++ header file? It looks like you just use .cs files, but I am not sure. I want to extract all of my functions that pull the data from the billing software and put them into a different file to clean up the code. Here is my XAML... <Window x:Class="WpfApplication3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Billing Management" Height="550" Width="754" xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared" WindowStartupLocation="CenterScreen" WindowStyle="ThreeDBorderWindow"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="22" /> <RowDefinition /> </Grid.RowDefinitions> <Menu Height="22" Name="menu1" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" HorizontalContentAlignment="Left" IsEnabled="True" IsMainMenu="True"> <MenuItem Header="_File"> <MenuItem Header="_Open" /> <MenuItem Header="_Close" /> <Separator/> <MenuItem Header="_Exit" /> </MenuItem> </Menu> <TabControl Name="tabControl1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" BorderThickness="1" Padding="0" TabStripPlacement="Bottom" UseLayoutRounding="False" FlowDirection="LeftToRight" Grid.Row="1"> <TabItem Header="Main" Name="tabItem1" Margin="0"> <DockPanel Name="dockPanel1" LastChildFill="True"> <ListBox Height="100" Name="listBox3" DockPanel.Dock="Top" /> <ListBox Name="listBox4" Width="200" DockPanel.Dock="Right" /> <DockPanel Height="Auto" Name="dockPanel2" Width="Auto" VerticalAlignment="Stretch" LastChildFill="True"> <shared:AnimatedExpander Header="Staff Online" Width="200" Name="expanderStaffOnline" IsExpanded="True" Height="194" BorderThickness="0" DockPanel.Dock="Top" VerticalContentAlignment="Stretch"> <ListBox Name="listboxStaffOnline" Width="Auto" Height="Auto" Margin="0" VerticalAlignment="Stretch" Loaded="listboxStaffOnline_Loaded" /> </shared:AnimatedExpander> <shared:AnimatedExpander Header="Test Menu 2" Height="Auto" Name="animatedExpander1" BorderThickness="1" Margin="0,0,0,0" IsExpanded="True" VerticalContentAlignment="Stretch"> <ListBox Height="Auto" HorizontalAlignment="Stretch" Name="listBox6" VerticalAlignment="Stretch" Margin="0" BorderThickness="1" /> </shared:AnimatedExpander> </DockPanel> <ListBox Height="100" Name="listboxAdminLogs" DockPanel.Dock="Bottom" Loaded="listboxAdminLogs_Loaded" /> <ListBox Name="listBox5" /> </DockPanel> </TabItem> <TabItem Header="Support" Name="tabItem2" Margin="0"> </TabItem> <TabItem Header="Clients" /> <TabItem Header="Billing" /> <TabItem Header="Orders" /> </TabControl> </Grid> </Window>

    Read the article

  • How do I draw a filled circle onto a graphics object in a hexadecimal colour? (C#)

    - by George Powell
    I need to draw a circle onto a bitmap in a specific colour given in Hex. The "Brushes" class only gives specific colours with names. Bitmap bitmap = new Bitmap(20, 20); Graphics g = Graphics.FromImage(bitmap); g.FillEllipse(Brushes.AliceBlue, 0, 0, 19, 19); //The input parameter is not a Hex //g.FillEllipse(new Brush("#ff00ffff"), 0, 0, 19, 19); <<This is the kind of think I need. Is there a way of doing this? The exact problem: I am generating KML (for Google earth) and I am generating lots of lines with different Hex colours. The colours are generated mathematically and I need to keep it that way so I can make as many colours as I want. I need to generate a PNG icon for each of the lines that is the same colour exactly.

    Read the article

  • Inject App Settings using Windsor

    - by Damian Powell
    How can I inject the value of an appSettings entry (from app.config or web.config) into a service using the Windsor container? If I wanted to inject the value of a Windsor property into a service, I would do something like this: <properties> <importantIntegerProperty>666</importantIntegerProperty> </properties> <component id="myComponent" service="MyApp.IService, MyApp" type="MyApp.Service, MyApp" > <parameters> <importantInteger>#{importantIntegerProperty}</importantInteger> </parameters> </component> However, what I'd really like to do is take the value represented by #{importantIntegerProperty} from an app settings variable which might be defined like this: <appSettings> <add key="importantInteger" value="666"/> </appSettings> EDIT: To clarify; I realise that this is not natively possible with Windsor and the David Hayden article that sliderhouserules refers to is actually about his own (David Hayden's) IoC container, not Windsor. I'm surely not the first person to have this problem so what I'd like to know is how have other people solved this issue?

    Read the article

  • How to test for existence of a script-scoped variable in PowerShell?

    - by Damian Powell
    Is it possible to test for the existence of a script-scoped variable in PowerShell? I've been using the PowerShell Community Extensions (PSCX) but I've noticed that if you import the module while Set-PSDebug -Strict is set, an error is produced: The variable '$SCRIPT:helpCache' cannot be retrieved because it has not been set. At C:\Users\...\Modules\Pscx\Modules\GetHelp\Pscx.GetHelp.psm1:5 char:24 While investigating how I might fix this, I found this piece of code in Pscx.GetHelp.psm1: #requires -version 2.0 param([string[]]$PreCacheList) if ((!$SCRIPT:helpCache) -or $RefreshCache) { $SCRIPT:helpCache = @{} } This is pretty straight forward code; if the cache doesn't exist or needs to be refreshed, create a new, empty cache. The problem is that calling $SCRIPT:helpCache while Set-PSDebug -Strict is in force casues the error because the variable hasn't been defined yet. Ideally, we could use a Test-Variable cmdlet but such a thing doesn't exist! I thought about looking in the variable: provider but I don't know how to determine the scope of a variable. So my question is: how can I test for the existence of a variable while Set-PSDebug -Strict is in force, without causing an error?

    Read the article

  • How can I ensure that a Java object (containing cryptographic material) is zeroized?

    - by Jeremy Powell
    My concern is that cryptographic keys and secrets that are managed by the garbage collector may be copied and moved around in memory without zeroization. As a possible solution, is it enough to: public class Key { private char[] key; // ... protected void finalize() throws Throwable { try { for(int k = 0; k < key.length; k++) { key[k] = '\0'; } } catch (Exception e) { //... } finally { super.finalize(); } } // ... }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >