SVN move a local working sub-dir containing some unversioned files
I have a structure a bit like
/work_dir
/resources
/sounds
/game_sounds
I want to move game_sounds into sounds without losing history, but it
contains some unversioned files which need to stay unversioned.
Is there a SVN command that can do this in one operation, if so what would
I do... and if not what would I do then?
(using svn client 1.6)
Bolender
Thursday, 3 October 2013
Wednesday, 2 October 2013
How to Authenticate a user using a remote API?
How to Authenticate a user using a remote API?
I have an MVC website which uses an API to authenticate the user, so when
the user tries to log in, my server will redirect the login information to
my api server in order to verify if the login was successful. If it is,
the user is able to enter the "private" section of the website.
All I want to do is verify with the API if the user is registered in the
application and which type of user it is (admin or regular user).
Depending on the outcome, we would be allowed or not to see some pages.
I am wondering how to do that and I hope you can clarify some things for me.
My first option would be to use Forms authentication and its
infrastructure and just change the way the server checks the credentials
(verifying with the API instead of a DB). Is that possible?
If this is not possible, can I use the method
Application_AuthenticateRequest(object sender, EventArgs e) in my
global.asax Or do I need to create my own IHttpModule?
I have an MVC website which uses an API to authenticate the user, so when
the user tries to log in, my server will redirect the login information to
my api server in order to verify if the login was successful. If it is,
the user is able to enter the "private" section of the website.
All I want to do is verify with the API if the user is registered in the
application and which type of user it is (admin or regular user).
Depending on the outcome, we would be allowed or not to see some pages.
I am wondering how to do that and I hope you can clarify some things for me.
My first option would be to use Forms authentication and its
infrastructure and just change the way the server checks the credentials
(verifying with the API instead of a DB). Is that possible?
If this is not possible, can I use the method
Application_AuthenticateRequest(object sender, EventArgs e) in my
global.asax Or do I need to create my own IHttpModule?
pass array to jquery for ajax processing
pass array to jquery for ajax processing
I have form elements:
<tr><td>Number</td><td><input type='text' name='number[]'
id='number[]'></td></tr>
<tr><td>Number</td><td><input type='text' name='number[]'
id='number[]'></td></tr>
I want to pass the values of this array to jquery for ajax processing.
jquery doesnt like $('#numbers[]') as an id.
I have also tried
for (a = 0;$a<5;$a++)
{
<tr><td>Number</td><td><input type='text' name='number[$a]'
id='number[$a]'></td></tr>
}
but that doesnt work either.
alert($(#'numbers['+i+']').val();
fails as well...
I have form elements:
<tr><td>Number</td><td><input type='text' name='number[]'
id='number[]'></td></tr>
<tr><td>Number</td><td><input type='text' name='number[]'
id='number[]'></td></tr>
I want to pass the values of this array to jquery for ajax processing.
jquery doesnt like $('#numbers[]') as an id.
I have also tried
for (a = 0;$a<5;$a++)
{
<tr><td>Number</td><td><input type='text' name='number[$a]'
id='number[$a]'></td></tr>
}
but that doesnt work either.
alert($(#'numbers['+i+']').val();
fails as well...
How to make a shadow with box-shadow property equal on booth sides
How to make a shadow with box-shadow property equal on booth sides
I am trying to make a simple (ribbon like) effect with box-shadow property
, i have made it on the right side but on the left side the effect is not
the same and i cant understand why! Does somebody have any idea? my code:
JSFIDDLE.
do i have to change something here maybe ?
box-shadow: 10px 10px 100px rgba(0, 0, 0, 10);
Thank you in advance and have a nice day!
I am trying to make a simple (ribbon like) effect with box-shadow property
, i have made it on the right side but on the left side the effect is not
the same and i cant understand why! Does somebody have any idea? my code:
JSFIDDLE.
do i have to change something here maybe ?
box-shadow: 10px 10px 100px rgba(0, 0, 0, 10);
Thank you in advance and have a nice day!
Tuesday, 1 October 2013
Connect interface builder component to IBOutlet that is a property of a class outside of any instance of a view controller?
Connect interface builder component to IBOutlet that is a property of a
class outside of any instance of a view controller?
I have a project that is a color picker. For each color component, red,
green, and blue, I have a UIPickerView, a textField, and a stepper. What I
want to do is create a class, let's call it ColorPickerObject that looks
like this
@interface ColorPickerObject : NSObject {
IBOutlet UITextField *colorTextField;
IBOutlet UIStepper *colorStepper;
IBOutlet UIPickerView *colorPicker;
int colorIntegerValue;
NSArray *valuesForComponent1InColorPicker;
NSArray *valuesForComponent2InColorPicker;
NSArray *valuesForComponent3InColorPicker;
}
@property IBOutlet UITextField *colorTextField;
@property IBOutlet UIStepper *colorStepper;
@property IBOutlet UIPickerView *colorPicker;
@property int colorIntegerValue;
@property NSArray *valuesForComponent1InColorPicker;
@property NSArray *valuesForComponent2InColorPicker;
@property NSArray *valuesForComponent3InColorPicker;
@end
Then, I have a colorPickerBrain that looks like this,
#import <Foundation/Foundation.h>
#import "ColorPickerObject.h"
@interface ColorPickerBrain : NSObject {
ColorPickerObject *red,
*green,
*blue;
}
//@property ColorPickerObject *red;
//@property ColorPickerObject *green;
//@property ColorPickerObject *blue;
@end
and for reference my colorPickerViewController, (not sure if this helps or
is relevant to the issue)
#import <UIKit/UIKit.h>
#import "ColorPickerBrain.h"
@interface ColorPickerViewController : UIViewController {
ColorPickerBrain *brain;
}
- (IBAction)redChanged:( id )sender;
- (IBAction)greenChanged:(id)sender;
- (IBAction)blueChanged:(id)sender;
@end
I have all of the UI components laid out on the story board but I am
unsure how to connect them to the outlets defined in the
ColorPickerObject. How can I connect these UIcomponents in my story board
to the outlets defined in ColorPickerObject through the brain instance
created in my view controller that has a red, green, and blue
ColorPickerObject.
I am new to ios, this is technically my first app and I have no idea what
to even look for. Everything I have found talks about connecting
components in a base class that is an instance of a UIView but this base
class isn't view based. I am coming from Java if that helps at all.
class outside of any instance of a view controller?
I have a project that is a color picker. For each color component, red,
green, and blue, I have a UIPickerView, a textField, and a stepper. What I
want to do is create a class, let's call it ColorPickerObject that looks
like this
@interface ColorPickerObject : NSObject {
IBOutlet UITextField *colorTextField;
IBOutlet UIStepper *colorStepper;
IBOutlet UIPickerView *colorPicker;
int colorIntegerValue;
NSArray *valuesForComponent1InColorPicker;
NSArray *valuesForComponent2InColorPicker;
NSArray *valuesForComponent3InColorPicker;
}
@property IBOutlet UITextField *colorTextField;
@property IBOutlet UIStepper *colorStepper;
@property IBOutlet UIPickerView *colorPicker;
@property int colorIntegerValue;
@property NSArray *valuesForComponent1InColorPicker;
@property NSArray *valuesForComponent2InColorPicker;
@property NSArray *valuesForComponent3InColorPicker;
@end
Then, I have a colorPickerBrain that looks like this,
#import <Foundation/Foundation.h>
#import "ColorPickerObject.h"
@interface ColorPickerBrain : NSObject {
ColorPickerObject *red,
*green,
*blue;
}
//@property ColorPickerObject *red;
//@property ColorPickerObject *green;
//@property ColorPickerObject *blue;
@end
and for reference my colorPickerViewController, (not sure if this helps or
is relevant to the issue)
#import <UIKit/UIKit.h>
#import "ColorPickerBrain.h"
@interface ColorPickerViewController : UIViewController {
ColorPickerBrain *brain;
}
- (IBAction)redChanged:( id )sender;
- (IBAction)greenChanged:(id)sender;
- (IBAction)blueChanged:(id)sender;
@end
I have all of the UI components laid out on the story board but I am
unsure how to connect them to the outlets defined in the
ColorPickerObject. How can I connect these UIcomponents in my story board
to the outlets defined in ColorPickerObject through the brain instance
created in my view controller that has a red, green, and blue
ColorPickerObject.
I am new to ios, this is technically my first app and I have no idea what
to even look for. Everything I have found talks about connecting
components in a base class that is an instance of a UIView but this base
class isn't view based. I am coming from Java if that helps at all.
Easy way to convert 4 space indentation to 2
Easy way to convert 4 space indentation to 2
I use 4-space indentation for all of my own work. I've picked up a large
project from a client where they insist on 2-space indentation. I've
already touched hundreds of lines of codes across many source files before
finding this out.
Xcode is the IDE I'm using here but I'm open to any solution. I'd like to
find some way that can just walk through the project and auto format the
indentation.
I've been looking for a bit but I mainly find people hand waving about
tabs vs spaces, 4 vs 2, etc. I've also run across indent, expand, and
unexpand commands but they don't seem to be quite right.
Any ideas?
I use 4-space indentation for all of my own work. I've picked up a large
project from a client where they insist on 2-space indentation. I've
already touched hundreds of lines of codes across many source files before
finding this out.
Xcode is the IDE I'm using here but I'm open to any solution. I'd like to
find some way that can just walk through the project and auto format the
indentation.
I've been looking for a bit but I mainly find people hand waving about
tabs vs spaces, 4 vs 2, etc. I've also run across indent, expand, and
unexpand commands but they don't seem to be quite right.
Any ideas?
Windows Server 2012 - Storage pools with different disk size
Windows Server 2012 - Storage pools with different disk size
I have 2 disks (1TB + 1.5TB) in a Storage Space. Free space shows up as
2.27TB.
I create a new Virtual disk with Simple layout (no redundancy). Maximum
size for the virtual disks stops at 1.82TB (seems to be the 2TB drive
limiting). I can then also create a second virtual disk of the remaining
size.
Why can't I create a 2.27TB disk, isn't that possible?
I have 2 disks (1TB + 1.5TB) in a Storage Space. Free space shows up as
2.27TB.
I create a new Virtual disk with Simple layout (no redundancy). Maximum
size for the virtual disks stops at 1.82TB (seems to be the 2TB drive
limiting). I can then also create a second virtual disk of the remaining
size.
Why can't I create a 2.27TB disk, isn't that possible?
Subscribe to:
Comments (Atom)