Search Results

Search found 7299 results on 292 pages for 'peter short'.

Page 12/292 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • error in auth.log but can login; LDAP/PAM

    - by Peter
    I have a server running OpenLDAP. When I start a ssh-session I can log in without problems, but an error appears in the logs. This only happens when I log in with a LDAP account (so not with a system account such as root). Any help to eliminate these errors would be much appreciated. The relevant piece from /var/log/auth.log sshd[6235]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=example.com user=peter sshd[6235]: Accepted password for peter from 192.168.1.2 port 2441 ssh2 sshd[6235]: pam_unix(sshd:session): session opened for user peter by (uid=0) pam common-session session [default=1] pam_permit.so session required pam_unix.so session optional pam_ldap.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 session required pam_limits.so session required pam_unix.so session optional pam_ldap.so pam common-auth auth [success=1 default=ignore] pam_ldap.so auth required pam_unix.so nullok_secure use_first_pass auth required pam_permit.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 silent auth sufficient pam_unix.so nullok_secure use_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet auth sufficient pam_ldap.so use_first_pass auth required pam_deny.so pam common-account account [success=2 new_authtok_reqd=done default=ignore] pam_ldap.so account [success=1 default=ignore] pam_unix.so account required pam_unix.so account sufficient pam_succeed_if.so uid < 1000 quiet account [default=bad success=ok user_unknown=ignore] pam_ldap.so account required pam_permit.so account sufficient pam_ldap.so account sufficient pam_unix.so

    Read the article

  • Silverlight Cream for June 21, 2011 -- #1110

    - by Dave Campbell
    In this Issue: Colin Eberhardt, Kunal Chowdhury(-2-), Peter Kuhn(-2-, -3-), Mike Gold, WindowsPhoneGeek, Nigel Sampson, Paul Sheriff, Dhananjay Kumar, and Erno de Weerd. Above the Fold: Silverlight: "Silverlight Debug Helper" Peter Kuhn3 WP7: "Metro In Motion #8 – AutoCompleteBox Reveal Animation" Colin Eberhardt Shoutouts: Check out the Top 5 from my friends at SilverlightShow from last week: SilverlightShow for June 13 - 19, 2011 From SilverlightCream.com: Metro In Motion #8 – AutoCompleteBox Reveal Animation Colin Eberhardt found yet another 'Metro In Motion' to duplicate... this one is the auto-complete effect seen in the WP7 email client... check out the video on the post! Windows Phone 7 (Mango) Tutorial - 16 - How to Create a WP7 Alarm Application? Kunal Chowdhury has a couple more of his Mango tutorials up... number 16 (!) is on creating an Alarm app using scheduled tasks. Windows Phone 7 (Mango) Tutorial - 17 - How to Create a WP7 Reminder Application? Kunal Chowdhury's latest is number 17 in the Mango series and he's discussing the Reminder class which is part of the Scheduler namespace. Silverlight Debug Helper Peter Kuhn has deployed a new version of his "Silverlight Debug Helper"... this time he's added support for FireFox and Chrome. Getting ready for the Windows Phone 7 Exam 70-599 (Part 3) Peter Kuhn also has Part 3 of his series posted at SilverlightShow on getting ready for the WP7 exam. XNA for Silverlight developers: Part 13 - Mango (2) Finally, Peter Kuhn's latest XNA for Silverlight developers tutorial is up at SilverlightShow and is the 2nd Mango post for game devs. Detecting Altitude using the WP7 Phone WindowsPhoneGeek apparently turned the reigns of his blog over to Mike Gold for this post about Altitude detection on the WP7. Windows Phone Mango: Getting Started with MVVM in 10 Minutes If you're out there and still haven't gotten your head around MVVM, or want to take another look at why you're beating yourself up doing it [ :) ]... WindowsPhoneGeek has a quick write-up on MVVM and WP7.1 apps Creating app promotional videos Nigel Sampson details how he uses Expression Encoder to produce the app videos he has on his blog for his WP7* apps. Sort Data in Windows Phone using Collection View Source Paul Sheriff's latest post is up, and is another WP7 post. This time on how to sort the data you consume by using a CollectionViewSource object in XAML and not write any code! Viewing Flickr Images on Windows 7.1 Phone or Mango Phone Dhananjay Kumar has a tutorial up for WP7.1 showing how to use the Flickr REST service to display images on your device. Windows Phone 7: Drawing graphics for your application with Inkscape – Part II: Icons Part 2 of Erno de Weerd's Trilogy on Drawing graphics for your WP7* apps in Inkscape is up... this tutorial is all about icons... good stuff! Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Can anyone explain why my crypto++ decrypted file 16 bytes short?

    - by Tom Williams
    I suspect it might be too much to hope for, but can anyone with experience with crypto++ explain why the "decrypted.out" file created by main() is 16 characters short (which probably not coincidentally is the block size)? I think the issue must be in CryptStreamBuffer::GetNextChar(), but I've been staring at it and the crypto++ documentation for hours. Any other comments about how crummy or naive my std::streambuf implementation are also welcome ;-) And I've just noticed I'm missing some calls to delete so you don't have to tell me about those. Thanks, Tom // Runtime Includes #include <iostream> // Crypto++ Includes #include "aes.h" #include "modes.h" // xxx_Mode< > #include "filters.h" // StringSource and // StreamTransformation #include "files.h" using namespace std; class CryptStreamBuffer: public std::streambuf { public: CryptStreamBuffer(istream& encryptedInput, CryptoPP::StreamTransformation& c); CryptStreamBuffer(ostream& encryptedOutput, CryptoPP::StreamTransformation& c); protected: virtual int_type overflow(int_type ch = traits_type::eof()); virtual int_type uflow(); virtual int_type underflow(); virtual int_type pbackfail(int_type ch); virtual int sync(); private: int GetNextChar(); int m_NextChar; // Buffered character CryptoPP::StreamTransformationFilter* m_StreamTransformationFilter; CryptoPP::FileSource* m_Source; CryptoPP::FileSink* m_Sink; }; // class CryptStreamBuffer CryptStreamBuffer::CryptStreamBuffer(istream& encryptedInput, CryptoPP::StreamTransformation& c) : m_NextChar(traits_type::eof()), m_StreamTransformationFilter(0), m_Source(0), m_Sink(0) { m_StreamTransformationFilter = new CryptoPP::StreamTransformationFilter(c); m_Source = new CryptoPP::FileSource(encryptedInput, false, m_StreamTransformationFilter); } CryptStreamBuffer::CryptStreamBuffer(ostream& encryptedOutput, CryptoPP::StreamTransformation& c) : m_NextChar(traits_type::eof()), m_StreamTransformationFilter(0), m_Source(0), m_Sink(0) { m_Sink = new CryptoPP::FileSink(encryptedOutput); m_StreamTransformationFilter = new CryptoPP::StreamTransformationFilter(c, m_Sink); } CryptStreamBuffer::int_type CryptStreamBuffer::overflow(int_type ch) { return m_StreamTransformationFilter->Put((byte)ch); } CryptStreamBuffer::int_type CryptStreamBuffer::uflow() { int_type result = GetNextChar(); // Reset the buffered character m_NextChar = traits_type::eof(); return result; } CryptStreamBuffer::int_type CryptStreamBuffer::underflow() { return GetNextChar(); } CryptStreamBuffer::int_type CryptStreamBuffer::pbackfail(int_type ch) { return traits_type::eof(); } int CryptStreamBuffer::sync() { if (m_Sink) { m_StreamTransformationFilter->MessageEnd(); } } int CryptStreamBuffer::GetNextChar() { // If we have a buffered character do nothing if (m_NextChar != traits_type::eof()) { return m_NextChar; } // If there are no more bytes currently available then pump the source // *** I SUSPECT THE PROBLEM IS HERE *** if (m_StreamTransformationFilter->MaxRetrievable() == 0) { m_Source->Pump(1024); } // Retrieve the next byte byte nextByte; size_t noBytes = m_StreamTransformationFilter->Get(nextByte); if (0 == noBytes) { return traits_type::eof(); } // Buffer up the next character m_NextChar = nextByte; return m_NextChar; } void InitKey(byte key[]) { key[0] = -62; key[1] = 102; key[2] = 78; key[3] = 75; key[4] = -96; key[5] = 125; key[6] = 66; key[7] = 125; key[8] = -95; key[9] = -66; key[10] = 114; key[11] = 22; key[12] = 48; key[13] = 111; key[14] = -51; key[15] = 112; } void DecryptFile(const char* sourceFileName, const char* destFileName) { ifstream ifs(sourceFileName, ios::in | ios::binary); ofstream ofs(destFileName, ios::out | ios::binary); byte key[CryptoPP::AES::DEFAULT_KEYLENGTH]; InitKey(key); CryptoPP::ECB_Mode<CryptoPP::AES>::Decryption decryptor(key, sizeof(key)); if (ifs) { if (ofs) { CryptStreamBuffer cryptBuf(ifs, decryptor); std::istream decrypt(&cryptBuf); int c; while (EOF != (c = decrypt.get())) { ofs << (char)c; } ofs.flush(); } else { std::cerr << "Failed to open file '" << destFileName << "'." << endl; } } else { std::cerr << "Failed to open file '" << sourceFileName << "'." << endl; } } void EncryptFile(const char* sourceFileName, const char* destFileName) { ifstream ifs(sourceFileName, ios::in | ios::binary); ofstream ofs(destFileName, ios::out | ios::binary); byte key[CryptoPP::AES::DEFAULT_KEYLENGTH]; InitKey(key); CryptoPP::ECB_Mode<CryptoPP::AES>::Encryption encryptor(key, sizeof(key)); if (ifs) { if (ofs) { CryptStreamBuffer cryptBuf(ofs, encryptor); std::ostream encrypt(&cryptBuf); int c; while (EOF != (c = ifs.get())) { encrypt << (char)c; } encrypt.flush(); } else { std::cerr << "Failed to open file '" << destFileName << "'." << endl; } } else { std::cerr << "Failed to open file '" << sourceFileName << "'." << endl; } } int main(int argc, char* argv[]) { EncryptFile(argv[1], "encrypted.out"); DecryptFile("encrypted.out", "decrypted.out"); return 0; }

    Read the article

  • Can anyone explain why my crypto++ decrypted file is 16 bytes short?

    - by Tom Williams
    I suspect it might be too much to hope for, but can anyone with experience with crypto++ explain why the "decrypted.out" file created by main() is 16 characters short (which probably not coincidentally is the block size)? I think the issue must be in CryptStreamBuffer::GetNextChar(), but I've been staring at it and the crypto++ documentation for hours. Any other comments about how crummy or naive my std::streambuf implementation are also welcome ;-) And I've just noticed I'm missing some calls to delete so you don't have to tell me about those. Thanks, Tom // Runtime Includes #include <iostream> // Crypto++ Includes #include "aes.h" #include "modes.h" // xxx_Mode< > #include "filters.h" // StringSource and // StreamTransformation #include "files.h" using namespace std; class CryptStreamBuffer: public std::streambuf { public: CryptStreamBuffer(istream& encryptedInput, CryptoPP::StreamTransformation& c); CryptStreamBuffer(ostream& encryptedOutput, CryptoPP::StreamTransformation& c); protected: virtual int_type overflow(int_type ch = traits_type::eof()); virtual int_type uflow(); virtual int_type underflow(); virtual int_type pbackfail(int_type ch); virtual int sync(); private: int GetNextChar(); int m_NextChar; // Buffered character CryptoPP::StreamTransformationFilter* m_StreamTransformationFilter; CryptoPP::FileSource* m_Source; CryptoPP::FileSink* m_Sink; }; // class CryptStreamBuffer CryptStreamBuffer::CryptStreamBuffer(istream& encryptedInput, CryptoPP::StreamTransformation& c) : m_NextChar(traits_type::eof()), m_StreamTransformationFilter(0), m_Source(0), m_Sink(0) { m_StreamTransformationFilter = new CryptoPP::StreamTransformationFilter(c); m_Source = new CryptoPP::FileSource(encryptedInput, false, m_StreamTransformationFilter); } CryptStreamBuffer::CryptStreamBuffer(ostream& encryptedOutput, CryptoPP::StreamTransformation& c) : m_NextChar(traits_type::eof()), m_StreamTransformationFilter(0), m_Source(0), m_Sink(0) { m_Sink = new CryptoPP::FileSink(encryptedOutput); m_StreamTransformationFilter = new CryptoPP::StreamTransformationFilter(c, m_Sink); } CryptStreamBuffer::int_type CryptStreamBuffer::overflow(int_type ch) { return m_StreamTransformationFilter->Put((byte)ch); } CryptStreamBuffer::int_type CryptStreamBuffer::uflow() { int_type result = GetNextChar(); // Reset the buffered character m_NextChar = traits_type::eof(); return result; } CryptStreamBuffer::int_type CryptStreamBuffer::underflow() { return GetNextChar(); } CryptStreamBuffer::int_type CryptStreamBuffer::pbackfail(int_type ch) { return traits_type::eof(); } int CryptStreamBuffer::sync() { if (m_Sink) { m_StreamTransformationFilter->MessageEnd(); } } int CryptStreamBuffer::GetNextChar() { // If we have a buffered character do nothing if (m_NextChar != traits_type::eof()) { return m_NextChar; } // If there are no more bytes currently available then pump the source // *** I SUSPECT THE PROBLEM IS HERE *** if (m_StreamTransformationFilter->MaxRetrievable() == 0) { m_Source->Pump(1024); } // Retrieve the next byte byte nextByte; size_t noBytes = m_StreamTransformationFilter->Get(nextByte); if (0 == noBytes) { return traits_type::eof(); } // Buffer up the next character m_NextChar = nextByte; return m_NextChar; } void InitKey(byte key[]) { key[0] = -62; key[1] = 102; key[2] = 78; key[3] = 75; key[4] = -96; key[5] = 125; key[6] = 66; key[7] = 125; key[8] = -95; key[9] = -66; key[10] = 114; key[11] = 22; key[12] = 48; key[13] = 111; key[14] = -51; key[15] = 112; } void DecryptFile(const char* sourceFileName, const char* destFileName) { ifstream ifs(sourceFileName, ios::in | ios::binary); ofstream ofs(destFileName, ios::out | ios::binary); byte key[CryptoPP::AES::DEFAULT_KEYLENGTH]; InitKey(key); CryptoPP::ECB_Mode<CryptoPP::AES>::Decryption decryptor(key, sizeof(key)); if (ifs) { if (ofs) { CryptStreamBuffer cryptBuf(ifs, decryptor); std::istream decrypt(&cryptBuf); int c; while (EOF != (c = decrypt.get())) { ofs << (char)c; } ofs.flush(); } else { std::cerr << "Failed to open file '" << destFileName << "'." << endl; } } else { std::cerr << "Failed to open file '" << sourceFileName << "'." << endl; } } void EncryptFile(const char* sourceFileName, const char* destFileName) { ifstream ifs(sourceFileName, ios::in | ios::binary); ofstream ofs(destFileName, ios::out | ios::binary); byte key[CryptoPP::AES::DEFAULT_KEYLENGTH]; InitKey(key); CryptoPP::ECB_Mode<CryptoPP::AES>::Encryption encryptor(key, sizeof(key)); if (ifs) { if (ofs) { CryptStreamBuffer cryptBuf(ofs, encryptor); std::ostream encrypt(&cryptBuf); int c; while (EOF != (c = ifs.get())) { encrypt << (char)c; } encrypt.flush(); } else { std::cerr << "Failed to open file '" << destFileName << "'." << endl; } } else { std::cerr << "Failed to open file '" << sourceFileName << "'." << endl; } } int main(int argc, char* argv[]) { EncryptFile(argv[1], "encrypted.out"); DecryptFile("encrypted.out", "decrypted.out"); return 0; }

    Read the article

  • Deploy from NetBeans IDE by Twisting an External Dial

    - by Geertjan
    Via this code in a NetBeans module, i.e., a registered NetBeans ModuleInstall class, you can twist the Tinkerforge Rotary Poti Bricklet to deploy the current application in the IDE: import com.tinkerforge.BrickMaster; import com.tinkerforge.BrickletLCD20x4; import com.tinkerforge.BrickletRotaryPoti; import com.tinkerforge.IPConnection; import javax.swing.Action; import javax.swing.JMenuItem; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectUtils; import org.openide.awt.Actions; import org.openide.modules.ModuleInstall; import org.openide.util.Utilities; public class Installer extends ModuleInstall { private static final String HOST = "localhost"; private static final int PORT = 4223; private static final String MASTERBRICKUID = "abc"; private static final String LCDUID = "abc"; private static final String ROTIUID = "abc"; private static IPConnection ipc; private static BrickMaster master = new BrickMaster(MASTERBRICKUID); private static BrickletLCD20x4 lcd = new BrickletLCD20x4(LCDUID); private static BrickletRotaryPoti poti = new BrickletRotaryPoti(ROTIUID); @Override public void restored() { try { ipc = new IPConnection(HOST, PORT); ipc.addDevice(master); ipc.addDevice(lcd); ipc.addDevice(poti); poti.setPositionCallbackPeriod(50); poti.addListener(new BrickletRotaryPoti.PositionListener() { @Override public void position(final short position) { lcd.backlightOn(); lcd.clearDisplay(); final Action runAction = Actions.forID("Project","org.netbeans.modules.project.ui.RunMainProject"); //The action must be invoked from menu item or toolbar button, //see line 147 in org.netbeans.modules.project.ui.actions.LookupSensitiveAction: JMenuItem jmi = new JMenuItem(runAction); //When position is 100 (range is -150 to 150), deploy the app //and print info about the project to the LCD display: if (position == 100) { jmi.doClick(); Project p = Utilities.actionsGlobalContext().lookup(Project.class); lcd.writeLine((short) 0, (short) 0, "Deployed:"); lcd.writeLine((short) 1, (short) 0, ProjectUtils.getInformation(p).getDisplayName()); } else { lcd.writeLine((short) 0, (short) 0, "Position: " + position); } } }); } catch (Exception e) { } } }

    Read the article

  • Devoxx UK JCP & Adopt-a-JSR activities

    - by Heather VanCura
    Devoxx UK starts this week!  The JCP Program is organizing many activities throughout the conference, including some tables in the Hackergarten area on 12-13 June.  Topics include Java EE, Data Grids, Java SE 8 (Lambdas and Date & Time API), Money & Currency API and OpenJDK.  We will have two book signings by Richard Warburton and Peter Pilgrim during the Hackergarten - free signed copy of their books at these times - first come, first served (limited quantities available).  Thursday night is the party and the Birds of a Feather (BoF) sessions - come with your favorite questions and topics related to the JCP, Adopt-a-JSR and Adopt OpenJDK Programs!  See below for the schedule of activities; I will fill in details for each session tomorrow.    Thursday 12 June 10:20 - 12:50 Java EE -- Arun Gupta 13:30-17:00 Lambdas/Date & Time API --Richard Warburton & Raoul-Gabriel Urma (also a book signing with Richard Warburon during the afternoon break) 14:30-17:30 Data Grids - Peter Lawrey 14:30-18:00 Money & Currency -- Anatole Tresch 18:45 Adopt OpenJDK BoF session (Java EE BoF runs concurrently) 19:45 JCP & Adopt-a-JSR BoF session Friday 13 June 10:20-13:00 OpenJDK -- Mani Sarkar  10:20- 14:30 Money & Currency -- Anatole Tresch 10:20 - 13:00 Java EE -- Peter Pilgrim 13:00-13:30 Peter Pilgrim Java EE 7 Book signing sponsored by JCP @ lunch time 13:30 - 15:30 JCP.Next/JSR 364 -- Heather VanCura

    Read the article

  • Where can i get the openal sdk for c++?

    - by Peter Short
    The OpenAL site I'm looking at is a crappy outdated and broken sharepoint portal and the SDK in the downloads section give me a 500 html code when i request it. http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip I found an OpenAL SDK on a softpedia and it has headers but not alu.h or alut.h which the tutorials I'm looking at apparently require for loading wavs etc. What am I missing? Is OpenAL dead or something?

    Read the article

  • Trying to implement fling events on an object

    - by Adam Short
    I have a game object, well a bitmap, which I'd like to "fling". I'm struggling to get it to fling ontouchlistener due to it being a bitmap and not sure how to proceed and I'm struggling to find the resources to help. Here's my code so far: https://github.com/addrum/Shapes GameActivity class: package com.main.shapes; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.os.Bundle; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View.OnTouchListener; import android.view.Window; public class GameActivity extends Activity { private GestureDetector gestureDetector; View view; Bitmap ball; float x, y; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Remove title bar this.requestWindowFeature(Window.FEATURE_NO_TITLE); view = new View(this); ball = BitmapFactory.decodeResource(getResources(), R.drawable.ball); gestureDetector = new GestureDetector(this, new GestureListener()); x = 0; y = 0; setContentView(view); ball.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(android.view.View v, MotionEvent event) { // TODO Auto-generated method stub return false; } }); } @Override protected void onPause() { super.onPause(); view.pause(); } @Override protected void onResume() { super.onResume(); view.resume(); } public class View extends SurfaceView implements Runnable { Thread thread = null; SurfaceHolder holder; boolean canRun = false; public View(Context context) { super(context); holder = getHolder(); } public void run() { while (canRun) { if (!holder.getSurface().isValid()) { continue; } Canvas c = holder.lockCanvas(); c.drawARGB(255, 255, 255, 255); c.drawBitmap(ball, x - (ball.getWidth() / 2), y - (ball.getHeight() / 2), null); holder.unlockCanvasAndPost(c); } } public void pause() { canRun = false; while (true) { try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } break; } thread = null; } public void resume() { canRun = true; thread = new Thread(this); thread.start(); } } } GestureListener class: package com.main.shapes; import android.view.GestureDetector.SimpleOnGestureListener; import android.view.MotionEvent; public class GestureListener extends SimpleOnGestureListener { private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_THRESHOLD_VELOCITY = 200; @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { //From Right to Left return true; } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { //From Left to Right return true; } if (e1.getY() - e2.getY() > SWIPE_MIN_DISTANCE && Math.abs(velocityY) > SWIPE_THRESHOLD_VELOCITY) { //From Bottom to Top return true; } else if (e2.getY() - e1.getY() > SWIPE_MIN_DISTANCE && Math.abs(velocityY) > SWIPE_THRESHOLD_VELOCITY) { //From Top to Bottom return true; } return false; } @Override public boolean onDown(MotionEvent e) { //always return true since all gestures always begin with onDown and<br> //if this returns false, the framework won't try to pick up onFling for example. return true; } }

    Read the article

  • Notification CeSetUserNotificationEx with custom sound

    - by inTagger
    Hail all! I want to display notification and play custom sound on my Windows Mobile 5/6 device. I have tried something like that, but my custom sound does not play, though message is displayed with standart sound. If i edit Wave key in [HKEY_CURRENT_USER\ControlPanel\Notifications{15F11F90-8A5F-454c-89FC-BA9B7AAB0CAD}] to sound file i need then it plays okay. But why there are flag NotificationAction.Sound and property UserNotification.Sound? It doesn't work. Also Vibration and Led don't work, if i use such flags. (You can obtain full project sources from http://dl.dropbox.com/u/1758206/Code/Thunder.zip) var trigger = new UserNotificationTrigger { StartTime = DateTime.Now + TimeSpan.FromSeconds(1), Type = NotificationType.ClassicTime }; var userNotification = new UserNotification { Sound = @"\Windows\Alarm1.wma", Text = "Hail from Penza, Russia!", Action = NotificationAction.Dialog | NotificationAction.Sound, Title = string.Empty, MaxSound = 16384 }; NotificationTools.SetUserNotification(0, trigger, userNotification); UserNotificationTrigger.cs: using System; using System.Runtime.InteropServices; namespace Thunder.Lib.ThunderMethod1 { /// <summary> /// Specifies the type of notification. /// </summary> public enum NotificationType { /// <summary> /// Equivalent to using the SetUserNotification function. /// The standard command line is supplied. /// </summary> ClassicTime = 4, /// <summary> /// System event notification. /// </summary> Event = 1, /// <summary> /// Time-based notification that is active for the time period between StartTime and EndTime. /// </summary> Period = 3, /// <summary> /// Time-based notification. /// </summary> Time = 2 } /// <summary> /// System Event Flags /// </summary> public enum NotificationEvent { None, TimeChange, SyncEnd, OnACPower, OffACPower, NetConnect, NetDisconnect, DeviceChange, IRDiscovered, RS232Detected, RestoreEnd, Wakeup, TimeZoneChange, MachineNameChange, RndisFNDetected, InternetProxyChange } /// <summary> /// Defines what event activates a notification. /// </summary> [StructLayout(LayoutKind.Sequential)] public class UserNotificationTrigger { internal int dwSize = 52; private int dwType; private int dwEvent; [MarshalAs(UnmanagedType.LPWStr)] private string lpszApplication = string.Empty; [MarshalAs(UnmanagedType.LPWStr)] private string lpszArguments; internal SYSTEMTIME stStartTime; internal SYSTEMTIME stEndTime; /// <summary> /// Specifies the type of notification. /// </summary> public NotificationType Type { get { return (NotificationType) dwType; } set { dwType = (int) value; } } /// <summary> /// Specifies the type of event should Type = Event. /// </summary> public NotificationEvent Event { get { return (NotificationEvent) dwEvent; } set { dwEvent = (int) value; } } /// <summary> /// Name of the application to execute. /// </summary> public string Application { get { return lpszApplication; } set { lpszApplication = value; } } /// <summary> /// Command line (without the application name). /// </summary> public string Arguments { get { return lpszArguments; } set { lpszArguments = value; } } /// <summary> /// Specifies the beginning of the notification period. /// </summary> public DateTime StartTime { get { return stStartTime.ToDateTime(); } set { stStartTime = SYSTEMTIME.FromDateTime(value); } } /// <summary> /// Specifies the end of the notification period. /// </summary> public DateTime EndTime { get { return stEndTime.ToDateTime(); } set { stEndTime = SYSTEMTIME.FromDateTime(value); } } } } UserNotification.cs: using System.Runtime.InteropServices; namespace Thunder.Lib.ThunderMethod1 { /// <summary> /// Contains information used for a user notification. /// </summary> [StructLayout(LayoutKind.Sequential)] public class UserNotification { private int ActionFlags; [MarshalAs(UnmanagedType.LPWStr)] private string pwszDialogTitle; [MarshalAs(UnmanagedType.LPWStr)] private string pwszDialogText; [MarshalAs(UnmanagedType.LPWStr)] private string pwszSound; private int nMaxSound; private int dwReserved; /// <summary> /// Any combination of the <see cref="T:Thunder.Lib.NotificationAction" /> members. /// </summary> /// <value>Flags which specifies the action(s) to be taken when the notification is triggered.</value> /// <remarks>Flags not valid on a given hardware platform will be ignored.</remarks> public NotificationAction Action { get { return (NotificationAction) ActionFlags; } set { ActionFlags = (int) value; } } /// <summary> /// Required if NotificationAction.Dialog is set, ignored otherwise /// </summary> public string Title { get { return pwszDialogTitle; } set { pwszDialogTitle = value; } } /// <summary> /// Required if NotificationAction.Dialog is set, ignored otherwise. /// </summary> public string Text { get { return pwszDialogText; } set { pwszDialogText = value; } } /// <summary> /// Sound string as supplied to PlaySound. /// </summary> public string Sound { get { return pwszSound; } set { pwszSound = value; } } public int MaxSound { get { return nMaxSound; } set { nMaxSound = value; } } } } NativeMethods.cs: using System; using System.Runtime.InteropServices; namespace Thunder.Lib.ThunderMethod1 { [StructLayout(LayoutKind.Sequential)] public struct SYSTEMTIME { public short wYear; public short wMonth; public short wDayOfWeek; public short wDay; public short wHour; public short wMinute; public short wSecond; public short wMillisecond; public static SYSTEMTIME FromDateTime(DateTime dt) { return new SYSTEMTIME { wYear = (short) dt.Year, wMonth = (short) dt.Month, wDayOfWeek = (short) dt.DayOfWeek, wDay = (short) dt.Day, wHour = (short) dt.Hour, wMinute = (short) dt.Minute, wSecond = (short) dt.Second, wMillisecond = (short) dt.Millisecond }; } public DateTime ToDateTime() { if ((((wYear == 0) && (wMonth == 0)) && ((wDay == 0) && (wHour == 0))) && ((wMinute == 0) && (wSecond == 0))) return DateTime.MinValue; return new DateTime(wYear, wMonth, wDay, wHour, wMinute, wSecond, wMillisecond); } } /// <summary> /// Specifies the action to take when a notification event occurs. /// </summary> [Flags] public enum NotificationAction { /// <summary> /// Displays the user notification dialog box. /// </summary> Dialog = 4, /// <summary> /// Flashes the LED. /// </summary> Led = 1, /// <summary> /// Dialog box z-order flag. /// Set if the notification dialog box should come up behind the password. /// </summary> Private = 32, /// <summary> /// Repeats the sound for 10–15 seconds. /// </summary> Repeat = 16, /// <summary> /// Plays the sound specified. /// </summary> Sound = 8, /// <summary> /// Vibrates the device. /// </summary> Vibrate = 2 } internal class NativeMethods { [DllImport("coredll.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern int CeSetUserNotificationEx(int hNotification, UserNotificationTrigger lpTrigger, UserNotification lpUserNotification); } } NotificationTools.cs: using System.ComponentModel; using System.Runtime.InteropServices; namespace Thunder.Lib.ThunderMethod1 { public static class NotificationTools { /// <summary> /// This function modifies an existing user notification. /// </summary> /// <param name="handle">Handle of the Notification to be modified</param> /// <param name="trigger">A UserNotificationTrigger that defines what event activates a notification.</param> /// <param name="notification">A UserNotification that defines how the system should respond when a notification occurs.</param> /// <returns>Handle to the notification event if successful.</returns> public static int SetUserNotification(int handle, UserNotificationTrigger trigger, UserNotification notification) { int num = NativeMethods.CeSetUserNotificationEx(handle, trigger, notification); if (num == 0) throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification"); return num; } } }

    Read the article

  • MVC3 custom validation attribute for an "at least one is required" situation

    - by Pricey
    Hi I have found this answer already: MVC3 Validation - Require One From Group Which is fairly specific to the checking of group names and uses reflection. My example is probably a bit simpler and I was just wondering if there was a simpler way to do it. I have the below: public class TimeInMinutesViewModel { private const short MINUTES_OR_SECONDS_MULTIPLIER = 60; //public string Label { get; set; } [Range(0,24, ErrorMessage = "Hours should be from 0 to 24")] public short Hours { get; set; } [Range(0,59, ErrorMessage = "Minutes should be from 0 to 59")] public short Minutes { get; set; } /// <summary> /// /// </summary> /// <returns></returns> public short TimeInMinutes() { // total minutes should not be negative if (Hours <= 0 && Minutes <= 0) { return 0; } // multiplier operater treats the right hand side as an int not a short int // so I am casting the result to a short even though both properties are already short int return (short)((Hours * MINUTES_OR_SECONDS_MULTIPLIER) + (Minutes * MINUTES_OR_SECONDS_MULTIPLIER)); } } I want to add a validation attribute either to the Hours & Minutes properties or the class itself.. and the idea is to just make sure at least 1 of these properties (Hours OR minutes) has a value, server and client side validation using a custom validation attribute. Does anyone have an example of this please? Thanks

    Read the article

  • Get client IP address

    - by Peter Larsson
    Up until now, I have used convuluted approaches to get the current user client IP-address. This weekend I browsed Books Online for SQL Server 2008 R2 (November CTP) and found this new cool function! SELECT  CONNECTIONPROPERTY('net_transport') AS net_transport,         CONNECTIONPROPERTY('protocol_type') AS protocol_type,         CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,         CONNECTIONPROPERTY('local_net_address') AS local_net_address,         CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,         CONNECTIONPROPERTY('client_net_address') AS client_net_address  //Peter

    Read the article

  • GNU Smalltalk package

    - by Peter
    I've installed the GNU Smalltalk package and can get to the SmallTalk command line with the command 'gst'. However, I can't start the visual gst browser using the command: $ gst-browser When I try, this is what I get: peter@peredur:~$ gst-browser Object: CFunctionDescriptor new: 1 "<0x40488720>" error: Invalid C call-out gdk_colormap_get_type SystemExceptions.CInterfaceError(Smalltalk.Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Smalltalk.Exception class)>>signal: (ExcHandling.st:161) Smalltalk.CFunctionDescriptor(Smalltalk.CCallable)>>callInto: (CCallable.st:165) GdkColormap class>>getType (GTK.star#VFS.ZipFile/Funcs.st:1) optimized [] in GLib class>>registerAllTypes (GTK.star#VFS.ZipFile/GtkDecl.st:78) Smalltalk.OrderedCollection>>do: (OrderColl.st:68) GLib class>>registerAllTypes (GTK.star#VFS.ZipFile/GtkDecl.st:78) Smalltalk.UndefinedObject>>executeStatements (GTK.star#VFS.ZipFile/GtkImpl.st:1078) Object: CFunctionDescriptor new: 1 "<0x404a7c28>" error: Invalid C call-out gtk_window_new SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Exception class)>>signal: (ExcHandling.st:161) CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165) GTK.GtkWindow class>>new: (GTK.star#VFS.ZipFile/Funcs.st:1) VisualGST.GtkDebugger(VisualGST.GtkMainWindow)>>initialize (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:131) VisualGST.GtkDebugger class(VisualGST.GtkMainWindow class)>>openSized: (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:19) [] in VisualGST.GtkDebugger class>>open: (VisualGST.star#VFS.ZipFile/Debugger/GtkDebugger.st:16) [] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/DebugTools.st:380) [] in Process>>onBlock:at:suspend: (Process.st:392) BlockClosure>>on:do: (BlkClosure.st:193) [] in Process>>onBlock:at:suspend: (Process.st:393) BlockClosure>>ensure: (BlkClosure.st:269) [] in Process>>onBlock:at:suspend: (Process.st:370) [] in BlockClosure>>asContext: (BlkClosure.st:179) BlockContext class>>fromClosure:parent: (BlkContext.st:68) Everything hangs at this point until I hit ^C, after which, I get: Object: CFunctionDescriptor new: 1 "<0x404a7c28>" error: Invalid C call-out gtk_window_new SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254) SystemExceptions.CInterfaceError class(Exception class)>>signal: (ExcHandling.st:161) CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165) GTK.GtkWindow class>>new: (GTK.star#VFS.ZipFile/Funcs.st:1) VisualGST.GtkDebugger(VisualGST.GtkMainWindow)>>initialize (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:131) VisualGST.GtkDebugger class(VisualGST.GtkMainWindow class)>>openSized: (VisualGST.star#VFS.ZipFile/GtkMainWindow.st:19) [] in VisualGST.GtkDebugger class>>open: (VisualGST.star#VFS.ZipFile/Debugger/GtkDebugger.st:16) [] in BlockClosure>>forkDebugger (DebugTools.star#VFS.ZipFile/DebugTools.st:380) [] in Process>>onBlock:at:suspend: (Process.st:392) BlockClosure>>on:do: (BlkClosure.st:193) [] in Process>>onBlock:at:suspend: (Process.st:393) BlockClosure>>ensure: (BlkClosure.st:269) [] in Process>>onBlock:at:suspend: (Process.st:370) [] in BlockClosure>>asContext: (BlkClosure.st:179) BlockContext class>>fromClosure:parent: (BlkContext.st:68) peter@peredur:~$ Is there a problem with this package?

    Read the article

  • How to let short content pages reach the bottom of the browser window and then a footer should appea

    - by UXdesigner
    In this case, I've developed a CSS code for this web application ..and sometimes the resulting data is too small and the footer of the site appears in the middle of the page and looks odd. I'd like to push that whitespace of the background to the browser's bottom and then followed by a footer. AND if the page is long, that text won't get overlapped by the footer. Can someone help me out with this code right here? I've been trying to use some of the codes I found on this page:http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page which talks about pretty much the same issue, but I can't get it completely done: What am I doing wrong ? @charset "utf-8"; body { margin: 0; padding: 0; text-align: center; height:100%; position: relative; height:100%; /* needed for container min-height */ } .spacer { clear: both; height: 0; margin: 0; padding: 0; font-size: 0.1em; } .spacer_left { clear: left; margin: 0 0 10px 0; padding: 0; font-size: 0.1em; } hr { height: 1px; margin: 20px 0 20px 0; border: 0; color: #ccc; background: #ccc; } #container { position:relative; /* needed for footer positioning*/ height:auto !important; /* real browsers */ height:100%; /* IE6: treaded as min-height*/ min-height:100%; /* real browsers */ width: 1160px; /* width of the site ! */ margin: 0 auto; padding: 0; border: 1px solid #333; text-align: left; } /* Context Bar */ h1#contexto { background:url('../images/menubarbg2.png'); width:1160px; height:30px; position:relative; margin-top:10px; visibility: inherit; font-family:Arial, Helvetica, sans-serif; font-size:12px; } #header { margin: 0; padding: 5px; height:70px; } h1#titulo { margin: 0; padding: 0 0 0; } #content { margin: -15px 20px 0 20px; /*padding: -6px 5px 20px 5px;*/ padding:1em 1em 5em; /* bottom padding for footer */ } div#content.columns { margin-left: 100px; } #content abbr, #content acronym { cursor: help; border-bottom: 1px dotted; } #content ul { list-style-type: square; } #content ul li, #content ol li { margin: 0 0 0.4em 0; padding: 0; } #content blockquote { width: 75%; margin: 0 auto; padding: 20px; } #footer { margin: 0; height: -30px; padding: 5px; clear: both; bottom:0; position:relative; } UPDATE: THE SOLUTION @charset "utf-8"; body, html { margin: 0; padding: 0; text-align: center; position: relative; height:100%; /* needed for footer positioning*/ } .spacer { clear: both; height: 0; margin: 0; padding: 0; font-size: 0.1em; } .spacer_left { clear: left; margin: 0 0 10px 0; padding: 0; font-size: 0.1em; } hr { height: 1px; margin: 20px 0 20px 0; border: 0; color: #ccc; background: #ccc; } #container { position:relative; /* needed for footer positioning*/ min-height: 100%;/* needed for footer positioning*/ height: auto !important;/* needed for footer positioning*/ height: 100%;/* needed for footer positioning*/ margin: 0 auto -30px;/* needed for footer positioning*/ width: 1160px; padding: 0; border: 1px solid #333; text-align: left; } #header { margin: 0; padding: 5px; height:70px; } h1#titulo { margin: 0; padding: 0 0 0; } h1#contexto { background:url('../images/menubarbg2.png'); width:1160px; height:30px; position:relative; margin-top:10px; visibility: inherit; font-family:Arial, Helvetica, sans-serif; font-size:12px; } #content { margin: -15px 20px 30px 20px; /* needed for footer positioning*/ } div#content.columns { margin-left: 100px; } #content abbr, #content acronym { cursor: help; border-bottom: 1px dotted; } #content ul { list-style-type: square; } #content ul li, #content ol li { margin: 0 0 0.4em 0; padding: 0; } #content blockquote { width: 75%; margin: 0 auto; padding: 20px; } #footer, .push /* needed for footer positioning*/ { padding: 5px; clear: both; position:absolute;/* needed for footer positioning*/ bottom:0;/* needed for footer positioning*/ height: -30px;/* needed for footer positioning*/ width:1150px; }

    Read the article

  • Async trigger for an update panel refreshes entire page when triggering too much in too short of tim

    - by Matt
    I have a search button tied to an update panel as a trigger like so: <asp:Panel ID="CRM_Search" runat="server"> <p>Search:&nbsp;<asp:TextBox ID="CRM_Search_Box" CssClass="CRM_Search_Box" runat="server"></asp:TextBox> <asp:Button ID="CRM_Search_Button" CssClass="CRM_Search_Button" runat="server" Text="Search" OnClick="SearchLeads" /></p> </asp:Panel> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="CRM_Search_Button" /> </Triggers> <ContentTemplate> /* Content Here */ </ContentTemplate> </asp:UpdatePanel> In my javascript I use jQuery to grab the search box and tie it's keyup to make the search button click: $($(".CRM_Search_Box")[0]).keyup( function () { $($(".CRM_Search_Button")[0]).click(); } ); This works perfectly, except when I start typing too fast. As soon as I type too fast (my guess is if it's any faster than the data actually returns) the entire page refreshes (doing a postback?) instead of just the update panel. I've also found that instead of typing, if I just click the button really fast it starts doing the same thing. Is there any way to prevent it from doing this? Possibly prevent 2nd requests until the first has been completed? If I'm not on the right track then anyone have any other ideas? Thanks, Matt

    Read the article

  • Decoding a compressed short string; uncertain on compression used - Updated

    - by James
    Hi, I have a program that is compressing a string in an unknown way. I know a few inputs and the output produced, but I am not sure what is being used to compress the string. Here are my examples. (just 38 x a, no spaces or anything else) In: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" Out: "026900211AA63000026900"   (just 32 x a) In: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" Out: "0209001c1aa7a000020900" (31 x a, then 1 b) In: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab" Out: "0209000177c553c000020900" (31 x b, then 1 a) In: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba" Out: "0209001e7754f38000020900" In: "Hey wot u doing 2day u wanna do something" Out: "02990011C7C62E78CE6B8E3ACD83E81B37C5C5A6B9D1E1B06963DB5E71155C1000029900" (same as previous string, but with a space at the end) In: "Hey wot u doing 2day u wanna do something " Out: "02A90012C7718B9E339AE2EB360FA02CDF17177A674786DF4B1EDAF388AAE08000000002A90000" The only definite thing I can see so far is digit 2 and 3 are the amount of characters (hex value), ie first one is 26 = 38 Also the first 6 digits are repeated at the end Any help / advice would be great, thanks!

    Read the article

  • How can I detect short phone numbers in iPhone web views?

    - by Pedro
    G'day All Most Australian phone numbers are 10 digits with the 1st 2 optional if they're a local area code. For those setting... viewer.dataDetectorTypes = UIDataDetectorTypePhoneNumber; on a web view works. We also have a range of 6 digit phone numbers (usually written xxx xxx or xx xxxx) which aren't being detected in my app. Is there a way to detect those phone numbers as well? Cheers & TIA, Pedro :)

    Read the article

  • I'm trying to build a to-do-list application in Objective C but coming up short.

    - by lampShade
    I'm getting this error: -[NSCFArray insertObject:atIndex:]: attempt to insert nil Here is the .m file: /* IBOutlet NSTextField *textField; IBOutlet NSTabView *tableView; IBOutlet NSButton *button; NSMutableArray *myArray; */ #import "AppController.h" @implementation AppController -(IBAction)addNewItem:(id)sender { myArray = [[NSMutableArray alloc]init]; tableView = [[NSTableView alloc] init]; [tableView setDataSource:self]; [textField stringValue]; NSString *string = [[NSString alloc] init]; string = [textField stringValue]; [myArray addObject:string]; NSLog(@"%d",[myArray count]); NSLog(@"%@",string); } - (int)numberOfRowsInTableView:(NSTableView *)aTableView { return [myArray count]; } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { //NSString *data = [myArray objectAtIndex:rowIndex]; return [myArray objectAtIndex:rowIndex]; } @end

    Read the article

  • Is there any way, short of "copy and paste inheritence" to share a .net class with a Silverlight app

    - by Jekke
    I have a project in two parts: a Silverlight front end and a WCF duplex service. Ideally, I would like to pass a message of a custom type (call it TradeOffer) from the WCF service to be consumed by the Silverlight application. When I try to, I get an error that indicates I can't pass an object of an unknown type across the wire like that and that, maybe, I could do so if I used the InternalsVisibleTo attribute on the server component. I'm not sure if that would work in this environment and know it would be messy in development. I originally put the message definition in a library to be used by both the service and the client, but couldn't add a reference to the library from the Silverlight client (because it's not a Silverlight assembly.) Is there some way I can access the definition of a message class from both the Silverlight client that consumes it and the service that publishes it without using the InternalsVisibleTo attribute or should I write the application another way?

    Read the article

  • thoughs on using Alpha Five v10 with Codeless AJAX for building an AJAX database app in a short amou

    - by william Hunter
    I need to build an AJAX application against our MS SQL Server database for my company. the app has to have user permissions and reporting and is pretty complex. I am really under the gun in terms of time. The company that I work for needs the app for an important project launch. A colleague/friend of mine in a different company recommended that I look at a product from Alpha Software called Alpha Five v10 with Codeless AJAX. He has told me that he has used it extensively and that it saves him a "serious boat load of time" and he says that he has not run into limitations because you can also write your own JavaScript or you wire in JQERY. Before I commit to Alpha Five v10, I would like to get any other opinions? Thanks. Norman Stern. Chicago

    Read the article

  • Thoughts on using Alpha Five v10 with Codeless AJAX for building an AJAX database app in a short amo

    - by william Hunter
    I need to build an AJAX application against our MS SQL Server database for my company. the app has to have user permissions and reporting and is pretty complex. I am really under the gun in terms of time. The company that I work for needs the app for an important project launch. A colleague/friend of mine in a different company recommended that I look at a product from Alpha Software called Alpha Five v10 with Codeless AJAX. He has told me that he has used it extensively and that it saves him a "serious boat load of time" and he says that he has not run into limitations because you can also write your own JavaScript or you wire in jQuery. Before I commit to Alpha Five v10, I would like to get any other opinions? Thanks. Norman Stern. Chicago

    Read the article

  • Mod Rewrite MS Hosting Hide Long Annoying URL By displaying the short URL?

    - by NJTechGuy
    Scenario : I have a PHP Forum and a Asp.Net site hosted on Linux and MS Hosting respectively (obvious right?!). My domain ABC.com is currently configured with PHP host whereas my ASP.Net site is using the default 1and1 generated URL (s0987465.onlinehome.us). So my question is, how to display ABC.com for any URL that includes s0987465.onlinehome.us? Example : s0987465.onlinehome.us/test.aspx?id=100 should display ABC.com or ABC.com/test.aspx?id=100 in the address bar by displaying content generated by s0987465.onlinehome.us?

    Read the article

  • C#; storing a short date in a DateTime object

    - by contactmatt
    I'm trying to store a shortened date (mm/dd/yyyy) into a DateTime object. The following code below is what I am currently trying to do; this includes the time (12:00:00 AM) which I do not want :( DateTime goodDateHolder = Convert.ToDateTime(DateTime.Now.ToShortDateString()); Result will be 10/19/2009 12:00:00 AM

    Read the article

  • Can MySQL / SQL's short hand of "Using" be used without saying "Inner Join" ?

    - by Jian Lin
    The following 2 statements are to join using gifts.giftID = sentgifts.giftID: mysql> select * from gifts, sentgifts using (giftID); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'using (giftID)' at line 1 and the second one: mysql> select * from gifts INNER JOIN sentgifts using (giftID); +--------+------------+----------------+---------------------+--------+------------+--------+------+---------------------+ | giftID | name | filename | effectiveTime | sentID | whenSent | fromID | toID | trytryWhen | +--------+------------+----------------+---------------------+--------+------------+--------+------+---------------------+ | 2 | teddy bear | bear.jpg | 2010-04-24 04:36:03 | 4 | 2010-04-24 | NULL | 111 | 2010-04-24 03:10:42 | | 6 | beer | beer_glass.png | 2010-04-24 05:18:12 | 5 | 2010-03-03 | 11 | 22 | 2010-03-03 00:00:00 | | 6 | beer | beer_glass.png | 2010-04-24 05:18:12 | 6 | 2010-04-24 | 11 | 222 | 2010-04-24 03:54:49 | | 6 | beer | beer_glass.png | 2010-04-24 05:18:12 | 7 | 2010-04-24 | 1 | 2 | 2010-04-24 03:58:45 | +--------+------------+----------------+---------------------+--------+------------+--------+------+---------------------+ 4 rows in set (0.00 sec) Can the first statement also use the "using" shorthand? It seems that when it is used then the word "Inner Join" must be specified... but the first statement is actually an inner join?

    Read the article

  • can anyone please suggest some simple and short js for vertical multiple text scroll???

    - by developer
    I have a js running in my site that is for text scrolling.What is does is that it scrolls a text vertically upwards then holds for a second or two and then shows next text.Here you can have an idea of what i need and im using http://www.dynamicdrive.com/dynamicindex2/crosstick.htm What i need now is a simple and shorter dynamic js for this scrolling,somewhat around 2 kb or so......i have looked around internet but couldnt find one........please suggest some!!!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >