#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
int strt_time ;
struct time_details user1;
struct time_details user2;
/*taking time inputs from user | we can make the array dynammic also
here if number of iterationa re not known */
for( int i=0;i<5; i++)
printf("enter 1st user start and end time ");
for( int i=0;i<5; i++)
printf("enter 2nt user start and end time ");
for (int k = 0;k<5 ;k++)
for (int l=0; l<5; l++)
(user1.strt_time[k]<=user2.strt_time[l] && user1.end_time[k]>=user2.strt_time[l])
(user1.strt_time[k]>=user2.strt_time[l] && user1.end_time[k]>user2.strt_time[l])
printf("\n found overlapping interval start from %d end at %d",start_lap_time,end_lap_time);
printf("\n No overlapping periond found between two users");
what is causing this error here "Operator '&' is not defined for string "select * from Miscellaneouse whe" and type 'DataRowView'."
provider = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source ="
dataFile = "C:\Users\PrintServer\Documents\Visual Studio 2010\Projects\Hr and Payroll1\HR and Payroll.accdb" ' Change it to your Access Database location
connString = provider & dataFile
myConnection.ConnectionString = connString
Dim str As String
str = "select * from Miscellaneouse where Position = '" & SlcComboBox1.SelectedValue & "' "
Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
dr = cmd.ExecuteReader
SlcTextBox9.Text = dr("Salary").ToString
Actually the start is the concept. Then the team building. Such an app is on phones, PCs, smart TVs and what else today? This means that for you to get such a system up today your team would be quite diverse plus a legal team and a content wrangling team. Even on a small scale this would mean a few hundred team members. For you as their leader, well, you get to do mostly vision planning and of course, find the money.
Jim is right. We don't know if you are a complete beginner, a jedi master database wrangler, or anywhere else inbetween. So we have no idea at what level we should be discussing this. Help us to help you by giving us a lot more background.
So, let me get this straight, your users, all of them on the other side of a web screen has their own database login? This seems kinda contrary to some of the technologies out there, windows forms, forms based authentication, identity framework, etc. This is a web login application. I am essentially making my own login screen via hash algorithims and I have an object relationally mapped user object with both roles and groups objects. I made an authentication attribute which I use to flag controllers, and I made a password complexity object for determining whether the user's password is strong enough. I also salted the passwords of all users in accordance to my web config file so that the hash password won't match any rainbow or brute force tables as per good crypto technique. I have heard of straight windows authentication which uses windows accounts, I have heard of identity framework for microsoft applications, and I have heard of forms based authentication where you create your own login page from scratch. Usually I believe that the application has a database login, and the users have a seperate login but I could be mistaken. Can you point me to some material for your method?
The sql server does have a table with the user's object inside it. It's just the user is already authenticated once they pass through my page, so the other applications need to know that the user has been authenticated, hence session state. Idk is there something i am missing?
New to Python. Background from TRS basic thru several versions of basic and ending with
Qbasic, some Perl and now trying Python.
I get the following error and have no idea what is causing it.
There would be 11 catagories and some catagories could have multiple entries for the period.
Traceback (most recent call last):
File "Forum-Code.py", line 87, in <module>
tcol1[mm] = col1 + amt
TypeError: 'int' object does not support item assignment
In my apps that used SQL databases we had the user supply their name and password for access to the SQL server. If they didn't have that, then they couldn't use the app. Also, what they could do was limited by their SQL account rights.
I guess you could weave your own security but here, we kept the security in the SQL system. Seemed easier than spreading it out into the apps.
I started working on a windows forms authentication project, which uses nhibernate, and has some management pages for managing user settings, such as resetting user password. This forms based authentication uses session state in order to save the user's authentication information. I will be using a special authentication attribute in order to determine whether the user has access to the application. Since the authentication method is it's own mosaic of object relational mapping code, attributes, repositories, and asp.net mvc pages, I was thinking I could run this application as it's own project on a web server, and I could use this authentication scheme for authenticating multiple applications. The only way to do this would be to save session state to the database instance and share it with the other applications. Does this sound like a correct solution? Or is there something more sophisticated I should be looking into?
Code is not really required at this point, it's just the question as to whether sharing sesssion state with other applications is the correct move, or whether I should be looking into something more sophsticated.
Additionally do other databases support session state sharing for asp.net mvc?
This is a C# asp.net mvc application. I am using nhibernate, and I have looked at some java applications. The Java way seems to be to store authentication info as a session variable, unlike entity framework/Identity framework which has some sort of cookie/Ticket setup. I don't really think there is a way to inject into the ...
As with most developers we've had enormous trouble with dates but we have a simple rule; Do not compare dates with anything other than the DateDiff() function! Another thing we always do is format dates as dd-MMM-yyyy for example; 13-Jun-2018 - we're fortunate in that every server we use, it's always using English.
How do you know that each row corresponds to the same numbered record? In your situation you should be selecting the record that contains that word. It should be set up so that the table is indexed by the word. An example structure would be
SELECT English FROM Words WHERE Esperanto = 'elephanto'
Words could also be set up with a secondary index on English to facilitate a reverse lookup.
I use this and it gives me the first row, i want to know how to increament it automatically so it returns the corresponding number of row. like when i click on the first word on list, it gives the first row, and when on second, it gives the second row, and so on...
Hi, I've written this code which i send below. now i have a listview, and when i click each item in my listview, i want it's related word to be fetched from db and shown in my textview. now it fetches all the data :(. look at the picture, for example when i click on abako in Esperanto field, i want the abacus to be shown in my textview, and so on for the other items in the list. i'm a beginner thanks a lot.
import sqlite3 as sqlite
import tkinter as tk
from tkinter import Text
from tkinter import Entry
from tkinter import Scrollbar
from tkinter import ttk
def __init__(self, master):
self.style = ttk.Style()
self.frame_header = ttk.Frame(master, relief=tk.FLAT)
self.frame_header.pack(side=tk.TOP, padx=5, pady=5)
self.logo = tk.PhotoImage(file=r'C:\EsperantoDict\eo.png')
self.small_logo = self.logo.subsample(10, 10)
ttk.Label(self.frame_header, image=self.small_logo).grid(row=0, column=0, stick="ne", padx=5, pady=5, rowspan=2)
ttk.Label(self.frame_header, text='EsperantoDict', font=('Arial', 18, 'bold')).grid(row=0, column=1)
self.frame_content = ttk.Frame(master)
self.entry_search = ttk.Entry(self.frame_content)
self.entry_search.insert(tk.END, "Type to Search")
self.button_search = ttk.Button(self.frame_content, text="Search")
self.aks = tk.PhotoImage(file=r'C:\EsperantoDict\search.png')
self.small_aks = self.aks.subsample(3, 3)
self.button_search.grid(row=0, column=1, columnspan=2)
self.listbox = tk.Listbox(self.frame_content, height=28)
self.scrollbar = ttk.Scrollbar(self.frame_content, orient=tk.VERTICAL, command=self.listbox.yview)
self.scrollbar.grid(row=1, column=1, sticky='ns')
self.textbox = tk.Text(self.frame_content, width=60, height=27)
self.db = sqlite.connect(r'C:\EsperantoDict\test.db')
self.cur = self.db.cursor()
self.cur.execute('SELECT Esperanto FROM Words')
for row in self.cur:
def enter_meaning(self, tag):
results = self.cur.execute("SELECT English FROM Words")
for row in results:
def entry_delete(self, ...