Search Results

Search found 2654 results on 107 pages for 'c sharp newbie'.

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

  • how to make a web-gallery with RoR?

    - by neuro
    hello, Im a newbie RoR kid, and I'm trying to make a web gallery app just like the onyx http://www.hulihanapplications.com/projects/onyx since it's outdated and i couldn't get it to work with my 2.3.8 rails' version. So, are plugins like paperclip or carrierwave any good for me to start with. Or should i take another route and writh the app from scratch. please provide me with good links regarding the subject. thank you in advance

    Read the article

  • Suggest me which web development technology i gotta use?

    - by shyam-daniel
    I am a newbie to the web application development. I have to start with a Framework which will make me grow up higher in my career. So please suggest which technology i have to choose? Lot of technologies for web development is articulating in this field like PHP,JSP,Stuts,JSF,Flex,ColdFusion etc. Give me some suggestions to how to start?

    Read the article

  • C# - Converting a float to an int... and changing the int depending on the remainder

    - by Django Reinhardt
    Hi, this is probably the really newbie question (well, I'm pretty sure it is), but I have a float that's being returned and I need a quick and efficient way of turning it into an int. Pretty simple, but I have an exception. If the remainder of the float is anything other than .0 then I want to increment the int. Some quick examples: Float = 98.0, Int = 98 Float = 98.1, Int = 99 Float = 6.6, Int = 7 etc. Thanks for any help!

    Read the article

  • Terminology for web app running on hardware

    - by Lily
    Hi, Let me start by saying I feel very silly asking this, hence the newbie tag. I am trying to investigate how to develop an UI application that will run directly on hardware. This will be very much like when you access the web based application within your router. I don't really know how what keywords and terminology to use so that i can search tutorials on the net. Can anybody give me the correct terms? If you have tutorial suggestions, they are welcome as well.

    Read the article

  • Learning Python and trying to get first two letters and last two letters of a string.

    - by Sergio Tapia
    Here's my code: # B. both_ends # Given a string s, return a string made of the first 2 # and the last 2 chars of the original string, # so 'spring' yields 'spng'. However, if the string length # is less than 2, return instead the empty string. def both_ends(s): if len(s) <= 2: return "" else: return s[0] + s[1] + s[len(s)-2] + s[len(s-1)] # +++your code here+++ return Unfortunately my program doesn't run. :( I'm sure I'm overlooking something since I'm a newbie with Python. Here's the error: > Traceback (most recent call last): File "C:\Users\Sergio\Desktop\google-python-exercises\google-python-exercises\basic\string1.py", line 120, in <module> main() File "C:\Users\Sergio\Desktop\google-python-exercises\google-python-exercises\basic\string1.py", line 97, in main test(both_ends('spring'), 'spng') File "C:\Users\Sergio\Desktop\google-python-exercises\google-python-exercises\basic\string1.py", line 44, in both_ends return s[0] + s[1] + s[len(s)-2] + s[len(s-1)] TypeError: unsupported operand type(s) for -: 'str' and 'int' Thanks for the help guys. :D

    Read the article

  • Using Protocol Buffers in J2EE?

    - by mlaverd
    Hello everyone, I have coded a server that uses Protocol Buffers in Java. A client talks to it using PB. I'd like to migrate the server code to J2EE and take advantage of the containers' built-in features like clustering. How can I have a service that receives PB messages and interprets them properly, and then gets them handled? I was thinking of a dedicated type of servlet, but how can it be done? I'm a J2EE newbie... I'm not familiar enough with J2EE application servers to know if there is a way to make that happen. P.S. I'm looking for a solution that uses TLS sockets directly. No overhead-causing middleman protocols like HTTP are welcome here. P.P.S. Open source solutions only please.

    Read the article

  • How to add a new item in a sharepoint list using web services in C sharp

    - by Frank
    Hi, I'm trying to add a new item to a sharepoint list from a winform application in c# using web services. As only result, I'm getting the useless exception "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." I have a web reference named WebSrvRef to http://server/site/subsite/_vti_bin/Lists.asmx And this code: XmlDocument xmlDoc; XmlElement elBatch; XmlNode ndReturn; string[] sValues; string sListGUID; string sViewGUID; if (lstResults.Items.Count < 1) { MessageBox.Show("Unable to Add To SharePoint\n" + "No test file processed. The list is blank.", "Add To SharePoint", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } WebSrvRef.Lists listService = new WebSrvRef.Lists(); sViewGUID = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"; // Test List View GUID sListGUID = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"; // Test List GUID listService.Credentials= System.Net.CredentialCache.DefaultCredentials; frmAddToSharePoint dlgAddSharePoint = new frmAddToSharePoint(); if (dlgAddSharePoint.ShowDialog() == DialogResult.Cancel) { dlgAddSharePoint.Dispose(); listService.Dispose(); return; } sValues = dlgAddSharePoint.Tag.ToString().Split('~'); dlgAddSharePoint.Dispose(); string strBatch = "<Method ID='1' Cmd='New'>" + "<Field Name='Client#'>" + sValues[0] + "</Field>" + "<Field Name='Company'>" + sValues[1] + "</Field>" + "<Field Name='Contact Name'>" + sValues[2] + "</Field>" + "<Field Name='Phone Number'>" + sValues[3] + "</Field>" + "<Field Name='Brand'>" + sValues[4] + "</Field>" + "<Field Name='Model'>" + sValues[5] + "</Field>" + "<Field Name='DPI'>" + sValues[6] + "</Field>" + "<Field Name='Color'>" + sValues[7] + "</Field>" + "<Field Name='Compression'>" + sValues[8] + "</Field>" + "<Field Name='Value % 1'>" + (((float)lstResults.Groups["Value 1"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 2'>" + (((float)lstResults.Groups["Value 2"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 3'>" + (((float)lstResults.Groups["Value 3"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 4'>" + (((float)lstResults.Groups["Value 4"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Value % 5'>" + (((float)lstResults.Groups["Value 5"].Tag)*100).ToString("##0.00") + "</Field>" + "<Field Name='Comments'></Field>" + "<Field Name='Overall'>" + (fTotalScore*100).ToString("##0.00") + "</Field>" + "<Field Name='Average'>" + (fTotalAvg * 100).ToString("##0.00") + "</Field>" + "<Field Name='Transfered'>" + sValues[9] + "</Field>" + "<Field Name='Notes'>" + sValues[10] + "</Field>" + "<Field Name='Resolved'>" + sValues[11] + "</Field>" + "</Method>"; try { xmlDoc = new System.Xml.XmlDocument(); elBatch = xmlDoc.CreateElement("Batch"); elBatch.SetAttribute("OnError", "Continue"); elBatch.SetAttribute("ListVersion", "1"); elBatch.SetAttribute("ViewName", sViewGUID); strBatch = strBatch.Replace("&", "&amp;"); elBatch.InnerXml = strBatch; ndReturn = listService.UpdateListItems(sListGUID, elBatch); MessageBox.Show(ndReturn.OuterXml); listService.Dispose(); } catch(Exception Ex) { MessageBox.Show(Ex.Message + "\n\nSource\n" + Ex.Source + "\n\nTargetSite\n" + Ex.TargetSite + "\n\nStackTrace\n" + Ex.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); listService.Dispose(); } What am I doing wrong? What am I missing? Please help!! Frank

    Read the article

  • C# Sharp: Partial Classes

    - by dcolumbus
    This is quick confirmation question: In order to make partial classes work, I initially thought that there would be a main Class public class ManageDates and then you would create partial classes like public partial class ManageDates to extend the ManageDates class. But from some experiementing, I've come to find out that if you're going to use partial classes, each individual class must be declared public partial class [ClassName] ... Am I correct in this conclusion?

    Read the article

  • sharp architecture question, nhibernate validation

    - by csetzkorn
    I have marked certain properties in my domain object for the nhibernate validation 'framework'. If I do this in my controller explicitly: ICollection<IValidationResult> test = bla.ValidationResults(); I get the validation errors which I could add to my asp.net mvc modelstate ideally, i would like an exception being thrown during: bla = blaRepository.SaveOrUpdate(bla); if i try to save or update the domain object. why is this not happening? my domain object bla derives from Entity. do I have to register something somehow? Thanks. christian

    Read the article

  • RoR associations through or not through?

    - by showFocus
    I have four models that are related to one another, the way I have it setup at the moment is I have to select a county, region and country when entering a new city. class Country < ActiveRecord::Base has_many :regions has_many :counties has_many :cities end class Region < ActiveRecord::Base has_one :country has_many :counties has_many :cities end class County < ActiveRecord::Base has_one :country has_one :region has_many :cities end class City < ActiveRecord::Base has_one :country has_one :region has_one :county end Would it be better to use the :through symbol in the association? So I could say the city: has_one :country, :through => :region Not sure if this is correct, I have read how :through works but I'm not sure if this is the best solution. I am a newbie and while I'm not struggling with the syntax and how things work, it would be good to get opinions on best practices and the way things should be done from some rails wizards! Thanks in advance.

    Read the article

  • How to set the pointer to the current row in the Datagridview in C Sharp

    - by user286546
    I have a datagridview on the Windows Form in c#. I am updating and filling the table adapter on the cell event. The problem is that When I go to lower half of the datagrid which is not visible until I scroll down, as I click any cell, the table adapter is filled and updated and the pointerpoints to the very first row. Any suggestion on how to fix it. I have a ideas to record the top row of the datagridview that is visible and set the pointer to that row. But how to do it?

    Read the article

  • C sharp code cleanup : resharper

    - by Ankit Rathod
    Hello, I just used Resharper in one application and it made me feel as if i don't know how to code at all in C# :(. On every line it gave me it's suggestions :- Few of Resharper's favorite suggestions are :- 1) SomObject o = new SomeObject(); Resharper will convert to : var o = new SomeObject() 2) this.Loaded += new RoutedEventHandler(MainPage_Loaded); to this.Loaded += MainPage_Loaded; 3) convert my variables and putting _ in front of all instance variables. 4) Removing class parent's name. I tested this on Silverlight. public partial class MainPage : UserControl to public partial class MainPage EDIT :- 5) replace instance variable this.variable = somevalue to variable = somevalue Are all of these really necessary? Is it really going to affect the efficiency of my program? I mean what good is it going to do by replacing my class names with var keyword. After all var is also replaced with class name at compile time. Is it doing because it has been programmed to do or do these things really affect in some or another way? Thanks in advance :)

    Read the article

  • C# Sharp Windows Application prevents Windows from shutting down / logging off

    - by user299711
    I have written a C# Windows Forms application, not a service (it is only used when the user is logged in and has a graphical user interface) that has a background thread running in an infinite loop. When I try shutting down Windows (7) however, it tells me the program is preventing it from shutting down or logging off and asks me whether I want to force a shutdown. Now, is there any possibility for my program to become aware (get a handler) of Windows trying to quit it or to log off? So, what I need is to make the application realize when Windows tries to quit. Thanks in advance.

    Read the article

  • in C# sharp, how you pronounce 'T?'

    - by plinth
    How do you pronounce 'bool?', 'int?' and their ilk? I've been mulling over options like "nullable of T", "T hook", "T huh", "T what" and "T" with a rising inflection. I'm not particularly satisfied with these as they seem either cumbersome or affected or both.

    Read the article

  • Problems with classes (super new)

    - by user260036
    Hi, I've problems to figure it out what's happening in the following exercise, I'm learning Smalltalk, so I'm newbie. Class Anew ^super new initialize. Ainitialize a:=0. Class Bnew: aParameter |instance| instance := super new. instance b: instance a + aParameter. ^instance Binitialize b:=0. The problem says what happen when the following code is executed: B new:10. But I can't not figure it out why instance variable does not belong to A class. Thanks

    Read the article

  • Need help joining tables...

    - by yuudachi
    I am a MySQL newbie, so sorry if this is a dumb question.. These are my tables. student table: SID (primary) student_name advisor (foreign key to faculty.facultyID) requested_advisor (foreign key to faculty.facultyID) faculty table: facultyID (primary key) advisor_name I want to query a table that shows everything in the student table, but I want advisor and requested_advisor to show up as names, not the ID numbers. so like it displays like this on the webpage: Student Name: Jane Smith SID: 860123456 Current Advisor: John Smith Requested advisor: James Smith not like this Student Name: Jane Smith SID: 860123456 Current Advisor: 1 Requested advisor: 2 SELECT student.student_name, SID, student_email, faculty.advisor_name FROM student INNER JOIN faculty ON student.advisor = faculty.facultyID; this comes out close, but I don't know how to get the requested_advisor to show up as a name.

    Read the article

  • Exception on inserting into Access 2010 in C Sharp

    - by slao.it
    Hello, I am getting this exception when inserting into a Access 2010 database. Ex: System.Data.OleDb.OleDbException (0x80040E14): Syntax error in string in query expression ''CityName ?'. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at ReadingData.Program.Main(String[] args) in C:\Users\user\documents\visual studio 2010\Projects\ReadingData\ReadingData\Program.cs:line 238 INSERT INTO CranbrookMain (ID,BlockNo,Plot,SubPlot,Code,Type,LastName,FirstName,ServiceHome,ServiceAddress,ServiceCity,Notes) VALUES ('1','Y','37','DS','C2','O','SMITH','John','Service Inc.','520B SLATER ROAD N.W.','CityName','CityName ? ') insertSQL = "INSERT INTO CranbrookMain (ID,BlockNo,Plot,SubPlot,Code,Type,LastName," + "FirstName,ServiceHome,ServiceAddress,ServiceCity,Notes) VALUES (" + "'"+id+ "','" + blockNo + "','" + plot + "','" + subPlot + "','" + code + "','" + type + "','" + lastname + "','" + firstname + "','" + serviceHome + "','" + serviceAddress + "','" + serviceCity + "','" + notes +"')"; Console.WriteLine(); OleDbCommand cmd = new OleDbCommand(insertSQL, con); // creating query command cmd.ExecuteNonQuery(); The error occurs in cmd.ExecuteNonQuery() function call. The above SQL INSERT statement works fine if I directly execute in the Access 2010 file.

    Read the article

  • Indexer in C sharp.

    - by Jacksquad
    Hello guys, i got a problem while overloading indexer property. public class ClassName { private int[] a; private int[] b; private string[] c; private string[] d; public int this[int pos] { get{ return a[pos];} set{a[pos] = value;} } public int this[int pos] { get{ return b[pos];} set{b[pos] = value;} } public int this[int pos] { get{ return c[pos];} set{c[pos] = value;} } public int this[int pos] { get{ return d[pos];} set{d[pos] = value;} } } /* I AM GETTING "Error 1 'Class1 variables' already defines a member called 'this' with the same parameter types" Please suggest me how to implement this?

    Read the article

  • PHP/Mysql issues

    - by queryne
    Php/my sql newbie question. I have a database I've imported into my local phpmyadmin. However it seems I can't access it from my a php application. The connection string seems right and when i try to authenticate user credentials to access database information, no problems. However authenticate everyone and knows when i put in fake credentials. Still it won't pull any other information from the database. For instance, once a users login they should see something like, "Hello username"... that kind of thing. At this point I see "Hello" without the username. Any ideas what i might be missing?

    Read the article

  • PHP/MySQL Database Issues

    - by queryne
    PHP/MySQL newbie question. I have a database I've imported into my local phpmyadmin. However it seems I can't access it from my a php application. The connection string seems right and when I try to authenticate user credentials to access database information, no problems. However authenticate everyone and knows when I put in fake credentials. Still it won't pull any other information from the database. For instance, once a users login they should see something like, "Hello username", that kind of thing. At this point I see "Hello" without the username. Any ideas what i might be missing?

    Read the article

  • windows control library in c sharp

    - by apals
    I have just added a textbox, button, label to validate ID of 12 characters. The library is called check_ID. It works fine. The only problem is i have to access the forecolor of label, backcolor of textbox , forecolor of button as per color scheme of the project. But it seems that none of the properties of the objects in check_ID are available for modification. I have even changed the modifier to public of all objects by repoening the check_ID project. Is there another way to access the properties of these objects that are created using windows control library?. A very big thanks in advance.

    Read the article

  • WPF textbox derived control override drag&drop OnPreviewDrop (C sharp)

    - by Petr Klus
    Hi, I have been working on my custom control derived from the TextBox and I have encountered a problem I can not solve right now. Brief description of the problem: my textbox contains plain text which contains tags which I want to keep consistent - so far I have overriden text selection so they can be selected only as a whole tag etc. Right now I have moved to processing of drag&drop. If any text is dropped on the textfield and it is dropped on the tag, I want the insertion to be moved before or after the tag. The actual problem is with setting of the e.Handled=true. If I set it to true, it almost works - the text is inserted via my routine, but it is not removed from the source. If I set it to false, after executing my method the original textbox's insertion method is run. Is there any way to alter event routing? Or am I approaching this wrong from the start? Code of my method: protected override void OnPreviewDragEnter(DragEventArgs e) { base.OnPreviewDragEnter(e); e.Handled = true; // let us draw our very own caret... } protected override void OnPreviewDrop(DragEventArgs e) { base.OnPreviewDrop(e); fieldsReady = false; int selStart = this.SelectionStart; int selLength = this.SelectionLength; string droppedData = (string)e.Data.GetData(DataFormats.StringFormat); // where to insert Point whereDropped = e.GetPosition(this); int droppedIndex = GetCharacterIndexFromPoint(whereDropped, true); if (droppedIndex == this.Text.Length - 1) { double c = GetRectFromCharacterIndex(droppedIndex).X; if (whereDropped.X > c) droppedIndex++; } // only if the source was us, do this: if (this.SelectionLength > 0) // this means that we are dragging from our textbox! { // was there any selection? if so, remove it! this.Text = this.Text.Substring(0, selStart) + this.Text.Substring(selStart + selLength); e.Handled = true; // 2DO!! alter the indices depending on the removed selection // insertion this.Text = this.Text.Substring(0, droppedIndex) + droppedData + this.Text.Substring(droppedIndex); } }

    Read the article

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