29 Topics

Member Avatar for
Member Avatar for Nathaniel10

I want to increase my knowledge of PHP by learning about classes. I wrote the following very simple test program. It works. But I would like to know improve it. I plan on writing more complex test programs and that won't be the time to iron out smaller issues. Thanks …

Member Avatar for diafol
0
441
Member Avatar for game4tress

I need to change the background image of a button that is declared in xaml, like this: <Button x:Name="btnBorder" Content="Moldura" Width="80" Height="80" Margin="10,6,10,6" Click="btnBorder_Click" > <Button.Background> <ImageBrush ImageSource="/Images/arrow-expand.png" AlignmentX="Center" Stretch="None" x:Name="imgSourceArrow" /> </Button.Background> </Button> and I'm trying to change the ImageSource of the ImageBrush. For that, I'm using this code …

Member Avatar for tinstaafl
0
2K
Member Avatar for adam.wolnikowski.9

I'm writing a program where the settings of a spreadsheet-like field of textboxes are changed using two for loops, and I can't for the life of me figure out why it's not working.I have tried declaring the txt variable and name variable in different orders using different methods, but nothing …

Member Avatar for adam.wolnikowski.9
0
252
Member Avatar for kentuckyjoe

I'm trying to iterate through the controls on a form and set the tabIndex to 0 for all labels. I copped the following code from google but it doesn't work for me and I'm pretty certain it's because all of my controls are on a panel and not on the …

Member Avatar for kentuckyjoe
0
261
Member Avatar for CoilFyzx

Good day folks. Problem: My program needs to import data from a database and display them in a table then manipulate and display the data in various ways. That bit is solved the next part is where I need help. The program then needs to save locally... 1. the newly …

Member Avatar for CoilFyzx
0
399
Member Avatar for johnnycho

I'm trying to learn, understand and implement object-oriented PHP. Something's happening which I don't understand, and I would appreciate any guidance or help. I have the following class with the following properties and method: class Film { public $film_ids; public $numfilms; public function getFilms() { global $dbh; global $film_ids; global …

Member Avatar for johnnycho
0
305
Member Avatar for manalibhadula

Hi, I am new to Java and is working on code in java which i need to keep a static sql script in property file and passing variable to it through java code and then iterating that property file to pass the variable value and writing that generated script to …

Member Avatar for mshauny
0
376
Member Avatar for CoilFyzx

Hello good day. I have a quick question is anyone able to assist me in saving a password file. I encrypted my password and so I want to save the salt and the encrypted password(which are byte arrays). I tried using a properties file, but I soon found out that …

Member Avatar for CoilFyzx
0
246
Member Avatar for LastMitch

Hi, I'm learning OOP and I'm having issue echoing an `attribute` function. This is my example: <?php class sandwich { function sandwich($hero) { echo "I like to eat $hero sandwich.<br>"; } } $a = new sandwich("roast beef"); $b = new sandwich("pastrami"); $c = new sandwich("turkey"); ?> When I echo it …

Member Avatar for LastMitch
0
142
Member Avatar for simplypixie

Rather than write a huge list of properties used by a class I want to know if I can dynamically generate them when needed. I have looked and __set and __get but I am not sure how (or if) I use them with what I am trying to do. The …

Member Avatar for simplypixie
0
5K
Member Avatar for yousafc#
Member Avatar for ChrisHunter
0
218
Member Avatar for prem2

Dear all, I am new to javascript.I have a little doubt in basic concepts in javascript. //Example Program class classname(){ //Decalaring Properties var length; var abcd; public function toUpperCase(){ //This Method is used to convert the strings into uppercase } public function toLowerCase(){ //This Method is used to convert the …

Member Avatar for Troy III
0
207
Member Avatar for galhajaj

Hello :) i found a need of properties in a Area class [CODE] public List<Tile> Tiles { get; set; } private int _goldValue; public int GoldValue { get { sum = 0; foreach (Tile t in Tiles) { sum += t.Surface.GoldValue; } return sum; } } [/CODE] well - something …

Member Avatar for galhajaj
0
115
Member Avatar for galhajaj

Hello :) about the get set shortcut - [CODE]public int MyVar { get; set; }[/CODE] for example how it different from just: [CODE]public int MyVar; [/CODE]??? i heard that in the shortcut it add private myVar... huh?? if i can't see it how can i use it? when i use …

Member Avatar for ddanbe
0
209
Member Avatar for LondonJava

I have configuration properties implemented as a java.util.Properties Object with the mappings saved in a config.properties file. I have managed to update the properties in a user input panel, so the user can change any settings while the application is live. However I want any changes a user makes to …

Member Avatar for LondonJava
0
219
Member Avatar for diafol

Hi all, been dipping my toe into OOP and am getting on OK, but I'm hitting a bit of a wall with a current project. classes: db (a PDO extended class) User Timetable The db is just a few shorthand ways of running PDO The User is just for handling …

Member Avatar for diafol
0
210
Member Avatar for cutebaboi

its been 6 days passed since i started making this assignment of mine it is to show how objectdatasource is used, until now, i still cannot getaway with this error, [B][U]The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. …

Member Avatar for cutebaboi
0
1K
Member Avatar for Executionerr

Hello, it seems I am having some difficulties with my project in witch I am training my C# skills. Well, the problem is I have wrote the biggest part of the code, but I have problem to finish what i started, so I left blank code lines. Here is a …

Member Avatar for RunTimeError
0
117
Member Avatar for elliot81

Hi, im having trouble understanding how private methods are accessed, and overall how they are used. [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SIT232_Ass1 { public class Plan { // declares constant private const int CHARGE_BLOCK = 30; // declates our private variables private decimal _MonthlyFee, _CallAllowance, _CallRate; …

Member Avatar for elliot81
0
137
Member Avatar for gunnarflax

Hi! I have a question regarding a problem I've faced dealing with object oriented PHP. I'm used to always return a value after a method has been executed and then use the returned value in other methods. But that's because I've always done that in procedural programming. So I wonder …

Member Avatar for gunnarflax
0
158
Member Avatar for vigneshd90

Hi, I would like to know if its possible to edit a properties file after the project is deployed. I tried editing the values in the properties file using a classloader. [CODE] ClassLoader classLoader = this.getClass().getClassLoader(); prop.load(classLoader.getResourceAsStream("test.properties"));[/CODE] It reads the values properly but I couldn't write it back to the …

Member Avatar for vigneshd90
0
769
Member Avatar for tinkee

i am using log4php for my logging in my development. is it possible to use 2 appenders on a single logfile? i wanted to have a daily logfile, thus wanted to use LoggerAppenderDailyfile that have properties also of rolling, thus needs the LoggerAppenderRollingFile. or if there is a way to …

Member Avatar for pritaeas
0
127
Member Avatar for Kiseki

hi guys, just wondering is it possible to set all the textbox align to center within a form using just only one line of code? Rather than using [CODE] 123TextBox.TextAlign = HorizontalAlignment.Center 456TextBox.TextAlign = HorizontalAlignment.Center [/CODE] for every Textbox. Thanks.

Member Avatar for Kiseki
0
820
Member Avatar for end3r

Hy, I have a .properties file with a key-value defined like this: [icode]my_property.value=text text text bla bla bla {0} qwerty {1}.[/icode] I need to know what class should I use if I want to read the value and insert parameters in {0} and {1}. In the past I used to …

Member Avatar for end3r
0
4K
Member Avatar for bigaditya

HI why do we use get/ set to change properties? I mean instead of writing [CODE]class Point { double x, y; public Point(double x, double y) { this.x = x; this.y = y; } public double X { get { return x; } set { x = value; } } …

Member Avatar for Lusiphur
0
839
Member Avatar for Lusiphur

As suggested by Duki in [URL="http://www.daniweb.com/forums/thread298488.html"]this thread[/URL] I figured I'd compile all the workable examples and explanations here towards the question of "Why do we use get/ set to change properties?" [QUOTE=pritesh2010]Properties provide the opportunity to protect a field in a class by reading and writing to it through the …

2
501
Member Avatar for ScottS4732

Hello... I have a composite control inside a repeater and I am trying to databind its properties like so (simplified example) : [CODE]<uc1:Control ID="id" runat="server" Value='<%# Eval("value") %>'>[/CODE] This works fine when I include the repeater inside a web user control, include that web user control inside ANOTHER web user …

0
122
Member Avatar for moyphus

Hi, i need to read the database connection properties,driver class, username and password in java code...How can i read that using some properties....

Member Avatar for masijade
0
100
Member Avatar for 3pid

hey guys, I`m a beginner in c# and I have a problem in using set/get in classes. actually I didn`t get why do we use them,can anyone please introduce them briefly for me?

Member Avatar for ddanbe
0
1K

The End.