#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)

struct time_details
    int strt_time[5] ;
    int end_time[5];

int main()
   struct time_details user1;
   struct time_details user2;
   int found=0;

   /*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 ");
       scanf("%d %d",&user1.strt_time[i],&user1.end_time[i]);


   for( int i=0;i<5; i++)
       printf("enter 2nt user start and end time ");
       scanf("%d %d",&user2.strt_time[i],&user2.end_time[i]);


  for (int k = 0;k<5 ;k++)
      for (int l=0; l<5; l++)
          if (
                (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])

              int start_lap_time=0;
              int end_lap_time=0;
              found ++;
              printf("\n found overlapping interval start from %d end at %d",start_lap_time,end_lap_time);

  if (found==0)
      printf("\n No overlapping periond found between two users");

    return 0;

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
        While dr.Read()
            SlcTextBox9.Text = dr("Salary").ToString

        End While

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.


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?


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

/> <


/> <

col1 = 0
col2 = 0
col3 = 0
col4 = 0
col5 = 0
col6 = 0
col7 = 0
col8 = 0
col9 = 0
col10 = 0
col11 = 0
mtotals = {}
tcol1 = {}
tcol2 = {}
tcol3 = {}
tcol4 = {}
tcol5 = {}
tcol6 = {}
tcol7 = {}
tcol8 = {}
tcol9 = {}
tcol10 = {}
tcol11 = {}
tcol1 =  0
tcol2 =  0
tcol3 =  0
tcol4 =  0
tcol5 =  0
tcol6 =  0
tcol7 =  0
tcol8 =  0
tcol9 =  0
tcol10 =  0
tcol11 =  0
stcol1 = 0
stcol2 = 0
stcol3 = 0
stcol4 = 0
stcol5 = 0
stcol6 = 0
stcol7 = 0
stcol8 = 0
stcol9 = 0
stcol10 = 0
stcol11 = 0
x = 0
amt = 0
tamt = 0
howp1 = 0
howp2 = 0
howp3 = 0
mm = 1
startmm = 1
with ...

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.

So you should use

DateDiff(d, LOANS.RELEASED, @d1) >= 0 AND DateDiff(d, @d2, LOANS.RELEASED) >= 0
  • you then don't have times to worry about too.

The important thing for your query, and to eliminate the error, is to format your dates correctly and if you are using an English server, use my suggestion above.


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

Table Words

SELECT English FROM Words WHERE Esperanto = 'elephanto'

Words could also be set up with a secondary index on English to facilitate a reverse lookup.


Of course it fetches all the words. That's what you are telling it to do. In order to restrict what gets returned you have to provide a WHERE clause as in

SELECT <fieldname> FROM ,tablename> WHERE <fieldname> <condition> <fieldvalue>

For example

SELECT FirstName, LastName FROM Employees WHERE EmployeeID = 221078

If you do that you get one record. If you leave out the WHERE clause you get records for all employees.


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

#GUI Widgets

class EsperantoDict:
    def __init__(self, master):

        master.resizable(False, False)

        self.style = ttk.Style()
        self.style.configure("TFrame", background='#EAFFCD')
        self.style.configure("TButton", background='#EAFFCD')
        self.style.configure("TLabel", background='#EAFFCD')

        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.grid(row=0, column=0)
        self.entry_search.insert(tk.END, "Type to Search")
        self.entry_search.bind('<Button-1>', self.entry_delete)

        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.config(image=self.small_aks, compound=tk.LEFT)
        self.button_search.grid(row=0, column=1, columnspan=2)

        self.listbox = tk.Listbox(self.frame_content, height=28)
        self.listbox.grid(row=1, column=0)
        self.scrollbar = ttk.Scrollbar(self.frame_content, orient=tk.VERTICAL, command=self.listbox.yview)
        self.scrollbar.grid(row=1, column=1, sticky='ns')
        self.listbox.bind('<<ListboxSelect>>', self.enter_meaning)

        self.textbox = tk.Text(self.frame_content, width=60, height=27)
        self.textbox.grid(row=1, column=2)

    # SQLite
        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:
            self.listbox.insert(tk.END, row)
    # SQLite

    def enter_meaning(self, tag):
        if self.listbox.curselection():
            results = self.cur.execute("SELECT English FROM Words")
            for row in results:
                self.textbox.insert(tk.END, row)

    def entry_delete(self, ...
Attachments Capture.PNG 24.56 KB