Vote count: 0 I am creating authentication model for my project, I want to use Django's PASSWORD_HASHERS for password field in my model, can you suggest me the proper way? My model.py file class vendor_registration(models.Model): first_name = models.CharField(max_length=255,null=True) last_name = models.CharField(max_length=255,null=True) email_id = models.EmailField(max_length=70,blank=False) password = models.CharField(max_length=255,null=True) created_on = models.DateTimeField(blank=True,null=True) I know how to use it for the User model, But need solution for custom user model.Thanks asked 1 min agoPiyush S. Wanare Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am creating an application in which i want to create a custom popup box by using javascript. Please help me for getting this. I am totally unknown about this. Any help will be appreciated. asked 1 min agoNeha Purwar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to be able to detect on my ruby on rails server side that a http request has come from a webView component in my app. The app is using react-native. I have tried setting the following in the AppDelegate.m file NSURL *url = [NSURL URLWithString:@"http://localhost:3000/signin"]; NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]; [request addValue:@"GolfMentor" forHTTPHeaderField:@"User-Agent"]; [request addValue:@"GolfMentor" forHTTPHeaderField:@"X-MY-CUSTOM-HEADER"]; NSLog(@"%@", [request allHTTPHeaderFields]); and the output in the console is GolfMentor[63924:12437749] { "User-Agent" =...
ادامه مطلبVote count: 0 I have a custom controller provider class that is working fine. I've tried adding a second one and it just keeps saying: Fatal error: Class 'BarBarControllerProvider' not found in C:xampphtdocsfoobarsrcapp.php on line 18 I've got it set up the same way as the first one, with namespace Bar; ... class BarControllerProvider implements ControllerProviderInterface { public function coect(Application $app) { ... $controllers = $app['controllers_factory']; $controllers->get('/', function () use ($app) { ... }); ... retu $controllers; } } And the autoloader set up in composer: { "require": { "silex/silex": "~1.3", "doctrine/dbal": "~2.2", "symfony/security": "^3.0" }, "autoload" : { "p...
ادامه مطلبVote count: 0 I have One Tableview and Using custom Cell and in this Cell i have one TextView. The Problem is When i long press on this TextView Then automatically Show canPerformAction I have To Stop this because i have use my custom Popup (Copy and Delete) using longPress Else if This canPerformAction is not stoppable Then i have add Two parameter (Copy and Delete) and This delete function how to Remove Cell . Please Help me Here is my Code ON VIEW CONTROLLER /* override func canBecomeFirstResponder() -> Bool { retu false } */ override func canPerformAction(action: Selector, withSender sender: AnyObject?) -> Bool { // You need to only retu true for the actions you want, otherwise you get t...
ادامه مطلبVote count: 0 I used custom metaboxes inside custom post type pages and now I can't migrate the data from one site to another (from stage to production). Any tips on how to do this? It seems that they either don't get exported or imported. asked 1 min agogoncalomarques Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm trying to create a syntax definition for a language using tmLanguage. I looked into textmate syntax grammar manual but unfortunately I caot find a naming convention for a custom function.. what I used is support.function instead. Is there a naming convention for a user-defined function? asked 2 mins agocatzilla Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Serverless is wonderful, but I have a little confuse if possible or how to leverage lambda as my "server" to handle custom auth flow? So that the serverless conception are more perfect. But not need to run an EC2 instance only to handle custom auth flow. Thanks P.S. my custom flow will have ID and password auth case and mobile phone number auth case asked 1 min agoJames Hong Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Is is possible to display custom incoming call screen instead of default one in android? Actually, I have worked on the issue for more than over 10 days. Now, my application receives incoming calls and the activity showing my custom incoming call screen appears. However, the problem is that the default one is always on the top.I am not able neither to hide it below my activity nor to disable it. So that only my activity is on the tap asked 2 mins agomustafa.yavuz Let's block ads! بخوانید...
ادامه مطلبVote count: -1 i have some data in listview from list view i want to send my one field to dialogbox ` l=(ListView) findViewById(android.R.id.list); l.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView arg0, View v,int position, long arg3) { TextView textView = (TextView) v.findViewById(R.id.name); String text = textView.getText().toString(); Toast.makeText(getApplicationContext(),text,Toast.LENGTH_SHORT).show(); final Dialog dialog = new Dialog(context); dialog.setContentView(R.layout.customdailog); dialog.setTitle("Fill This Form"); // set the custom dialog components - text, image and button EditText DrName,Patient_mobile,Useame; Dr...
ادامه مطلبVote count: 0 I have a method getDate which retus String value. I'd like to add custom buttons but I can't because Eclipse tells me to change method type to int instead of String. What can I do here? public String getDate(String info){ retu JOptionPane.showInputDialog(null, info, "Date insertion", JOptionPane.PLAIN_MESSAGE); } This is how this InputDialog looks like: IMAGE I want this dialog to have let's say Yes/No/Quit buttons and if I understand correctly, code like this should work: public String getDate(String info){ retu JOptionPane.showOptionDialog(null,info, "Date insertion", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,null,options, null); } But it says "caot conve...
ادامه مطلبVote count: 0 I am working on a custom vector (String_vector) based off of a custom string class (String). I am having trouble with my copy assignment, and I think I am in some sort of loop that doesn't terminate. In my implementation I retu *this as shown here, where I implement the copy-and-swap method. String class: class String{ public: int len; char *str; String() :len(0), str(nullptr){} String(char const* S) :len(strlen(S)), str(new char[len +1]){ assert(S != 0); strcpy(str, S); } ~String(){ delete[]str; } }; String_vector class: class String_vector{ public: String_vector(std::initializer_list); String* base = nullptr; String* last = nullptr; String* limit = nullptr; String_vector(){};...
ادامه مطلبVote count: 0 Is it possible to add a Custom Message globally on runtime-erros? I would like to have a time-stamp as this would help figuring out if a file eventually was written by that execution process. asked 57 secs agouser1767754 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have written a custom Cordova plugin that brings as a dependency "Media" plugin. When i run "cordova plugin add "myPlugin"" the plugin is installed to the sample project however when in my index.js i try to init my plugin it does not recognise it and if i try to create "Media" object it does. Here is my plugin .xml file : MyPlugin Cordova MyPlugin Plugin MyPlugin MIT MyPlugin Thanks for the help. asked 2 mins agorony_y Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have an ArrayList with custom json objects fetched from the web with Volley. I would like to be able to save and restore these objects on a screen rotate. I would also like to save and restore my current scrolled position on screen rotate. I have a sketchy idea that this can be done with onSaveInstanceState and onRestoreInstanceState? Activity Code public class MainActivity extends AppCompatActivity { private final String TAG = "MainActivity"; //Creating a list of posts private List mPostItemsList; //Creating Views private RecyclerView recyclerView; private RecyclerView.Adapter adapter; private RecyclerView.LayoutManager layoutManager; private ProgressDialog mProgressDialog; ...
ادامه مطلبVote count: -1 This might be a tough one. I am creating some custom tools to my Qt development toolkit. I have a need for somehow, in the way intellisense in Qt Creator and Visual Studio does, to get "metadata" of different available classes that are included in some inspected c++ file. -How could I get such information? -How does Qt Creator do this? Visual Studio? -Should I use object files for this? Thanks. asked 1 min agoMiika Pirttilä Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have to add an ordered list of items as following images. How can I achieve that in Android? asked 1 min agoFigen Güngör Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Hopefully this will be a quick question. I wanted to add an image to my landing page that scales to any screen. I found this code to be the suggested and most optimal method html { background: url('image/img.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } However I am having problems implementing this. This code does what it is supposed to, however if I set it under html then this image takes place anywhere I call html in my site which I dont want. I want this to occur in one page of my site only. I tried creating my own custom html tag bodycover {} but that didn't work. I am ...
ادامه مطلبVote count: 0 So I am ruing a bridge plugin that hooks Xenforo forum into Wordpress, with single sign-on (User authentication is entirely handled by Xenforo, and all WP login/registrations etc are redirected to matching Xenforo links). However in wp-admin, upon cookie expiration a popup iframe appears with a login form, though with this bridge it literally loads the entire Xenforo's login page. Because I'm trying to modify the display of this page w/o using exteal changes to Xenforo, I suppose the only way would be to inject custom CSS into the iframe popup and use display:none on all the Xenforo elements I don't want. Basically I don't want an entire web page loading in the popup, but just ...
ادامه مطلبVote count: 0 I have a SupportMapFragment and I am trying to draw a user drawn line, exactly like here, I am trying to use this questions accepted answer using Alteative Method #2, which seems to allow you to put the SupportMapFragment in a FrameLayout. However, I can't get it to work for me. It seems like the View of the MapFragment has requestDisallowInterceptTouchEvent() set to true, preventing me from consuming the touch events properly, but I can consume the touch events on the parts of the screen not containing the map fragment. All of the questions I've seen on here seem to do the opposite of what I want to do. Here's my xml code relevant to the map (root linearlayout contains other v...
ادامه مطلب